fix bad indentation and whitespace resulting from cut&paste
This commit is contained in:
parent
dfd1ae2f86
commit
51aed12e52
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user