diff options
-rw-r--r-- | sys/netinet/ip_output.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 5600ca7..ee10fdc 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -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); |