summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2001-01-02 15:17:19 +0000
committerume <ume@FreeBSD.org>2001-01-02 15:17:19 +0000
commit3e7ec8ed402fca35161589100b7de09f23bd21ce (patch)
treebee0aa6c5680a4a91972accf4ff6eb5230dc8afd /sys
parenta11ea16dad4881b8316db0c862fdf7762259dd86 (diff)
downloadFreeBSD-src-3e7ec8ed402fca35161589100b7de09f23bd21ce.zip
FreeBSD-src-3e7ec8ed402fca35161589100b7de09f23bd21ce.tar.gz
do not touch ra_addr if it is NULL. from IIJ SEIL team
Obtained from: KAME
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet6/in6_prefix.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet6/in6_prefix.c b/sys/netinet6/in6_prefix.c
index b75a72f..1eaea50 100644
--- a/sys/netinet6/in6_prefix.c
+++ b/sys/netinet6/in6_prefix.c
@@ -603,14 +603,16 @@ add_each_addr(struct socket *so, struct rr_prefix *rpp, struct rp_addr *rap)
if (ia6 != NULL) {
if (ia6->ia6_ifpr == NULL) {
/* link this addr and the prefix each other */
- IFAFREE(&rap->ra_addr->ia_ifa);
+ if (rap->ra_addr)
+ IFAFREE(&rap->ra_addr->ia_ifa);
rap->ra_addr = ia6;
rap->ra_addr->ia_ifa.ifa_refcnt++;
ia6->ia6_ifpr = rp2ifpr(rpp);
return;
}
if (ia6->ia6_ifpr == rp2ifpr(rpp)) {
- IFAFREE(&rap->ra_addr->ia_ifa);
+ if (rap->ra_addr)
+ IFAFREE(&rap->ra_addr->ia_ifa);
rap->ra_addr = ia6;
rap->ra_addr->ia_ifa.ifa_refcnt++;
return;
OpenPOWER on IntegriCloud