mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
Cleanup comments and whitespace. No functional changes.
This commit is contained in:
parent
a49b317c41
commit
3c065f2f3e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=260709
@ -123,9 +123,6 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags,
|
||||
struct mbuf *m0;
|
||||
int hlen = sizeof (struct ip);
|
||||
int mtu;
|
||||
#if 0
|
||||
int n; /* scratchpad */
|
||||
#endif
|
||||
int error = 0;
|
||||
struct sockaddr_in *dst;
|
||||
const struct sockaddr_in *gw;
|
||||
@ -158,7 +155,7 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags,
|
||||
#ifdef FLOWTABLE
|
||||
if (ro->ro_rt == NULL) {
|
||||
struct flentry *fle;
|
||||
|
||||
|
||||
/*
|
||||
* The flow table returns route entries valid for up to 30
|
||||
* seconds; we rely on the remainder of ip_output() taking no
|
||||
@ -205,19 +202,18 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags,
|
||||
/*
|
||||
* dst/gw handling:
|
||||
*
|
||||
* dst can be rewritten but always point to &ro->ro_dst
|
||||
* gw is readonly but can be pointed either to dst OR rt_gatewy
|
||||
* therefore we need restore GW if we're re-doing lookup
|
||||
* dst can be rewritten but always points to &ro->ro_dst.
|
||||
* gw is readonly but can point either to dst OR rt_gateway,
|
||||
* therefore we need restore gw if we're redoing lookup.
|
||||
*/
|
||||
gw = dst = (struct sockaddr_in *)&ro->ro_dst;
|
||||
again:
|
||||
ia = NULL;
|
||||
/*
|
||||
* If there is a cached route,
|
||||
* check that it is to the same destination
|
||||
* and is still up. If not, free it and try again.
|
||||
* The address family should also be checked in case of sharing the
|
||||
* cache with IPv6.
|
||||
* If there is a cached route, check that it is to the same
|
||||
* destination and is still up. If not, free it and try again.
|
||||
* The address family should also be checked in case of sharing
|
||||
* the cache with IPv6.
|
||||
*/
|
||||
rte = ro->ro_rt;
|
||||
if (rte && ((rte->rt_flags & RTF_UP) == 0 ||
|
||||
@ -770,10 +766,10 @@ ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu,
|
||||
}
|
||||
#endif
|
||||
if (len > PAGE_SIZE) {
|
||||
/*
|
||||
* Fragment large datagrams such that each segment
|
||||
* contains a multiple of PAGE_SIZE amount of data,
|
||||
* plus headers. This enables a receiver to perform
|
||||
/*
|
||||
* Fragment large datagrams such that each segment
|
||||
* contains a multiple of PAGE_SIZE amount of data,
|
||||
* plus headers. This enables a receiver to perform
|
||||
* page-flipping zero-copy optimizations.
|
||||
*
|
||||
* XXX When does this help given that sender and receiver
|
||||
@ -787,7 +783,7 @@ ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu,
|
||||
off += m->m_len;
|
||||
|
||||
/*
|
||||
* firstlen (off - hlen) must be aligned on an
|
||||
* firstlen (off - hlen) must be aligned on an
|
||||
* 8-byte boundary
|
||||
*/
|
||||
if (off < hlen)
|
||||
@ -1172,7 +1168,7 @@ ip_ctloutput(struct socket *so, struct sockopt *sopt)
|
||||
case IP_OPTIONS:
|
||||
case IP_RETOPTS:
|
||||
if (inp->inp_options)
|
||||
error = sooptcopyout(sopt,
|
||||
error = sooptcopyout(sopt,
|
||||
mtod(inp->inp_options,
|
||||
char *),
|
||||
inp->inp_options->m_len);
|
||||
|
Loading…
Reference in New Issue
Block a user