diff options
author | 2013-10-20 22:28:58 +0000 | |
---|---|---|
committer | 2013-10-20 22:28:58 +0000 | |
commit | a51d12e7df4a138cd3ed9b9ec7372f9151fdc464 (patch) | |
tree | 85f3abcad52f120c43693f03542e1fc94fc9abc6 /sys | |
parent | Introduce write-only (for now) display.font parameter, which issues a (diff) | |
download | wireguard-openbsd-a51d12e7df4a138cd3ed9b9ec7372f9151fdc464.tar.xz wireguard-openbsd-a51d12e7df4a138cd3ed9b9ec7372f9151fdc464.zip |
Make the IPv4 and IPv6 code look similar to allow easy comparison.
While there fix some white space errors. No functional change.
OK claudio@ phessler@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/in_pcb.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index b710bf30fd7..20585c892b8 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in_pcb.c,v 1.143 2013/10/20 11:03:00 phessler Exp $ */ +/* $OpenBSD: in_pcb.c,v 1.144 2013/10/20 22:28:58 bluhm Exp $ */ /* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */ /* @@ -485,7 +485,7 @@ in_pcbdetach(struct inpcb *inp) TAILQ_REMOVE(&inp->inp_tdb_in->tdb_inp_in, inp, inp_tdb_in_next); if (inp->inp_tdb_out) - TAILQ_REMOVE(&inp->inp_tdb_out->tdb_inp_out, inp, + TAILQ_REMOVE(&inp->inp_tdb_out->tdb_inp_out, inp, inp_tdb_out_next); if (inp->inp_ipsec_remotecred) ipsp_reffree(inp->inp_ipsec_remotecred); @@ -696,8 +696,8 @@ in_pcblookup(struct inpcbtable *table, void *faddrp, u_int fport_arg, #endif /* INET6 */ { #ifdef INET6 - if (inp->inp_flags & INP_IPV6) - continue; + if (inp->inp_flags & INP_IPV6) + continue; #endif /* INET6 */ if (inp->inp_faddr.s_addr != INADDR_ANY) { @@ -915,8 +915,7 @@ in_pcbhashlookup(struct inpcbtable *table, struct in_addr faddr, continue; /*XXX*/ #endif if (inp->inp_faddr.s_addr == faddr.s_addr && - inp->inp_fport == fport && - inp->inp_lport == lport && + inp->inp_fport == fport && inp->inp_lport == lport && inp->inp_laddr.s_addr == laddr.s_addr && rtable_l2(inp->inp_rtableid) == rdomain) { /* @@ -1096,9 +1095,9 @@ in6_pcblookup_listen(struct inpcbtable *table, struct in6_addr *laddr, if (!(inp->inp_flags & INP_IPV6)) continue; if (inp->inp_lport == lport && inp->inp_fport == 0 && - rtable_l2(inp->inp_rtableid) == rtable && IN6_ARE_ADDR_EQUAL(&inp->inp_laddr6, key1) && - IN6_IS_ADDR_UNSPECIFIED(&inp->inp_faddr6)) + IN6_IS_ADDR_UNSPECIFIED(&inp->inp_faddr6) && + rtable_l2(inp->inp_rtableid) == rtable) break; } if (inp == NULL && ! IN6_ARE_ADDR_EQUAL(key1, key2)) { @@ -1107,9 +1106,9 @@ in6_pcblookup_listen(struct inpcbtable *table, struct in6_addr *laddr, if (!(inp->inp_flags & INP_IPV6)) continue; if (inp->inp_lport == lport && inp->inp_fport == 0 && - rtable_l2(inp->inp_rtableid) == rtable && - IN6_ARE_ADDR_EQUAL(&inp->inp_laddr6, key2) && - IN6_IS_ADDR_UNSPECIFIED(&inp->inp_faddr6)) + IN6_ARE_ADDR_EQUAL(&inp->inp_laddr6, key2) && + IN6_IS_ADDR_UNSPECIFIED(&inp->inp_faddr6) && + rtable_l2(inp->inp_rtableid) == rtable) break; } } |