diff options
author | luigi <luigi@FreeBSD.org> | 2002-06-23 09:15:43 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2002-06-23 09:15:43 +0000 |
commit | 21d4ca5fd25d06c26dd48093b5d36350012314ab (patch) | |
tree | 5a84f34f03306b9bd5242132a7767569c40eb195 /sys | |
parent | d781bb858560179b268a621f683f6095be16dc49 (diff) | |
download | FreeBSD-src-21d4ca5fd25d06c26dd48093b5d36350012314ab.zip FreeBSD-src-21d4ca5fd25d06c26dd48093b5d36350012314ab.tar.gz |
fix bad indentation and whitespace resulting from cut&paste
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_input.c | 13 | ||||
-rw-r--r-- | sys/netinet/ip_output.c | 38 |
2 files changed, 25 insertions, 26 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 1d29d54..2780622 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -287,8 +287,8 @@ ip_input(struct mbuf *m) args.divert_rule = 0; /* divert cookie */ args.next_hop = NULL; - /* Grab info from MT_TAG mbufs prepended to the chain. */ - for (; m && m->m_type == MT_TAG; m = m->m_next) { + /* Grab info from MT_TAG mbufs prepended to the chain. */ + for (; m && m->m_type == MT_TAG; m = m->m_next) { switch(m->m_tag_id) { default: printf("ip_input: unrecognised MT_TAG tag %d\n", @@ -307,7 +307,7 @@ ip_input(struct mbuf *m) args.next_hop = (struct sockaddr_in *)m->m_hdr.mh_data; break; } - } + } KASSERT(m != NULL && (m->m_flags & M_PKTHDR) != 0, ("ip_input: no HDR")); @@ -463,9 +463,8 @@ iphack: if (i == 0 && args.next_hop == NULL) /* common case */ goto pass; if (DUMMYNET_LOADED && (i & IP_FW_PORT_DYNT_FLAG) != 0) { - /* Send packet to the appropriate pipe */ - - ip_dn_io_ptr(m, i&0xffff, DN_TO_IP_IN, &args); + /* Send packet to the appropriate pipe */ + ip_dn_io_ptr(m, i&0xffff, DN_TO_IP_IN, &args); return; } #ifdef IPDIVERT @@ -817,7 +816,7 @@ found: * Switch out to protocol's input routine. */ ipstat.ips_delivered++; - if (args.next_hop && ip->ip_p == IPPROTO_TCP) { + if (args.next_hop && ip->ip_p == IPPROTO_TCP) { /* TCP needs IPFORWARD info if available */ struct m_hdr tag; diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 1b0cd61..3d5d7d9 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -142,10 +142,10 @@ ip_output(m0, opt, ro, flags, imo) args.eh = NULL; args.rule = NULL; args.next_hop = NULL; - args.divert_rule = 0; /* divert cookie */ - + args.divert_rule = 0; /* divert cookie */ + /* Grab info from MT_TAG mbufs prepended to the chain. */ - for (; m0 && m0->m_type == MT_TAG; m0 = m0->m_next) { + for (; m0 && m0->m_type == MT_TAG; m0 = m0->m_next) { switch(m0->m_tag_id) { default: printf("ip_output: unrecognised MT_TAG tag %d\n", @@ -175,7 +175,7 @@ ip_output(m0, opt, ro, flags, imo) args.next_hop = (struct sockaddr_in *)m0->m_data; break; } - } + } m = m0; KASSERT(!m || (m->m_flags & M_PKTHDR) != 0, ("ip_output: no HDR")); @@ -187,7 +187,7 @@ ip_output(m0, opt, ro, flags, imo) so = ipsec_getsocket(m); (void)ipsec_setsocket(m, NULL); #endif - if (args.rule != NULL) { /* dummynet already saw us */ + if (args.rule != NULL) { /* dummynet already saw us */ ip = mtod(m, struct ip *); hlen = IP_VHL_HL(ip->ip_vhl) << 2 ; ia = ifatoia(ro->ro_rt->rt_ifa); @@ -613,20 +613,20 @@ skip_ipsec: dst = args.next_hop; /* - * On return we must do the following: - * m == NULL -> drop the pkt (old interface, deprecated) - * (off & IP_FW_PORT_DENY_FLAG) -> drop the pkt (new interface) - * 1<=off<= 0xffff -> DIVERT - * (off & IP_FW_PORT_DYNT_FLAG) -> send to a DUMMYNET pipe - * (off & IP_FW_PORT_TEE_FLAG) -> TEE the packet - * dst != old -> IPFIREWALL_FORWARD - * off==0, dst==old -> accept - * If some of the above modules are not compiled in, then - * we should't have to check the corresponding condition - * (because the ipfw control socket should not accept - * unsupported rules), but better play safe and drop - * packets in case of doubt. - */ + * On return we must do the following: + * m == NULL -> drop the pkt (old interface, deprecated) + * (off & IP_FW_PORT_DENY_FLAG) -> drop the pkt (new interface) + * 1<=off<= 0xffff -> DIVERT + * (off & IP_FW_PORT_DYNT_FLAG) -> send to a DUMMYNET pipe + * (off & IP_FW_PORT_TEE_FLAG) -> TEE the packet + * dst != old -> IPFIREWALL_FORWARD + * off==0, dst==old -> accept + * If some of the above modules are not compiled in, then + * we should't have to check the corresponding condition + * (because the ipfw control socket should not accept + * unsupported rules), but better play safe and drop + * packets in case of doubt. + */ if ( (off & IP_FW_PORT_DENY_FLAG) || m == NULL) { if (m) m_freem(m); |