diff options
-rw-r--r-- | sys/net/pf_if.c | 22 | ||||
-rw-r--r-- | sys/netinet6/in6_pcb.c | 10 | ||||
-rw-r--r-- | sys/netinet6/raw_ip6.c | 8 |
3 files changed, 20 insertions, 20 deletions
diff --git a/sys/net/pf_if.c b/sys/net/pf_if.c index 14e42deffb1..658689647d6 100644 --- a/sys/net/pf_if.c +++ b/sys/net/pf_if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_if.c,v 1.69 2014/01/03 12:43:09 pelikan Exp $ */ +/* $OpenBSD: pf_if.c,v 1.70 2014/01/08 22:38:29 bluhm Exp $ */ /* * Copyright 2005 Henning Brauer <henning@openbsd.org> @@ -474,16 +474,16 @@ pfi_table_update(struct pfr_ktable *kt, struct pfi_kif *kif, int net, int flags) void pfi_instance_add(struct ifnet *ifp, int net, int flags) { - struct ifaddr *ia; + struct ifaddr *ifa; int got4 = 0, got6 = 0; int net2, af; if (ifp == NULL) return; - TAILQ_FOREACH(ia, &ifp->if_addrlist, ifa_list) { - if (ia->ifa_addr == NULL) + TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) { + if (ifa->ifa_addr == NULL) continue; - af = ia->ifa_addr->sa_family; + af = ifa->ifa_addr->sa_family; if (af != AF_INET && af != AF_INET6) continue; if ((flags & PFI_AFLAG_BROADCAST) && af == AF_INET6) @@ -496,7 +496,7 @@ pfi_instance_add(struct ifnet *ifp, int net, int flags) continue; if ((flags & PFI_AFLAG_NETWORK) && af == AF_INET6 && IN6_IS_ADDR_LINKLOCAL( - &((struct sockaddr_in6 *)ia->ifa_addr)->sin6_addr)) + &((struct sockaddr_in6 *)ifa->ifa_addr)->sin6_addr)) continue; if (flags & PFI_AFLAG_NOALIAS) { if (af == AF_INET && got4) @@ -512,19 +512,19 @@ pfi_instance_add(struct ifnet *ifp, int net, int flags) if (net2 == 128 && (flags & PFI_AFLAG_NETWORK)) { if (af == AF_INET) net2 = pfi_unmask(&((struct sockaddr_in *) - ia->ifa_netmask)->sin_addr); + ifa->ifa_netmask)->sin_addr); else if (af == AF_INET6) net2 = pfi_unmask(&((struct sockaddr_in6 *) - ia->ifa_netmask)->sin6_addr); + ifa->ifa_netmask)->sin6_addr); } if (af == AF_INET && net2 > 32) net2 = 32; if (flags & PFI_AFLAG_BROADCAST) - pfi_address_add(ia->ifa_broadaddr, af, net2); + pfi_address_add(ifa->ifa_broadaddr, af, net2); else if (flags & PFI_AFLAG_PEER) - pfi_address_add(ia->ifa_dstaddr, af, net2); + pfi_address_add(ifa->ifa_dstaddr, af, net2); else - pfi_address_add(ia->ifa_addr, af, net2); + pfi_address_add(ifa->ifa_addr, af, net2); } } diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 633b8586125..bbd3c50abab 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_pcb.c,v 1.58 2013/12/20 02:04:09 krw Exp $ */ +/* $OpenBSD: in6_pcb.c,v 1.59 2014/01/08 22:38:29 bluhm Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -218,7 +218,7 @@ in6_pcbbind(struct inpcb *inp, struct mbuf *nam, struct proc *p) if (so->so_options & SO_REUSEADDR) reuseport = SO_REUSEADDR | SO_REUSEPORT; } else if (!IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { - struct ifaddr *ia = NULL; + struct ifaddr *ifa = NULL; sin6->sin6_port = 0; /* * Yechhhh, because of upcoming @@ -228,7 +228,7 @@ in6_pcbbind(struct inpcb *inp, struct mbuf *nam, struct proc *p) */ sin6->sin6_flowinfo = 0; if (!(so->so_options & SO_BINDANY) && - (ia = ifa_ifwithaddr(sin6tosa(sin6), + (ifa = ifa_ifwithaddr(sin6tosa(sin6), inp->inp_rtableid)) == NULL) return EADDRNOTAVAIL; @@ -245,8 +245,8 @@ in6_pcbbind(struct inpcb *inp, struct mbuf *nam, struct proc *p) * flag to control the bind(2) behavior against * deprecated addresses (default: forbid bind(2)). */ - if (ia && - ifatoia6(ia)->ia6_flags & + if (ifa && + ifatoia6(ifa)->ia6_flags & (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY|IN6_IFF_DETACHED)) return (EADDRNOTAVAIL); } diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index 80f8e9af9f3..93fe8a8b342 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raw_ip6.c,v 1.63 2013/12/20 02:04:09 krw Exp $ */ +/* $OpenBSD: raw_ip6.c,v 1.64 2014/01/08 22:38:29 bluhm Exp $ */ /* $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $ */ /* @@ -661,7 +661,7 @@ rip6_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, case PRU_BIND: { struct sockaddr_in6 *addr = mtod(nam, struct sockaddr_in6 *); - struct ifaddr *ia = NULL; + struct ifaddr *ifa = NULL; if (nam->m_len != sizeof(*addr)) { error = EINVAL; @@ -688,12 +688,12 @@ rip6_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, */ if (!IN6_IS_ADDR_UNSPECIFIED(&addr->sin6_addr) && !(so->so_options & SO_BINDANY) && - (ia = ifa_ifwithaddr(sin6tosa(addr), + (ifa = ifa_ifwithaddr(sin6tosa(addr), in6p->inp_rtableid)) == 0) { error = EADDRNOTAVAIL; break; } - if (ia && ifatoia6(ia)->ia6_flags & + if (ifa && ifatoia6(ifa)->ia6_flags & (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY| IN6_IFF_DETACHED|IN6_IFF_DEPRECATED)) { error = EADDRNOTAVAIL; |