Skip to content

Commit

Permalink
added check to avoid failing 'ip6_getpktaddrs()' in mip6_bc_encapcheck
Browse files Browse the repository at this point in the history
on NetBSD(OpenBSD).
  • Loading branch information
t-momose committed Dec 12, 2002
1 parent dcb4c98 commit 7744d65
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kame/sys/netinet6/mip6_binding.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $KAME: mip6_binding.c,v 1.156 2002/12/09 10:51:20 t-momose Exp $ */
/* $KAME: mip6_binding.c,v 1.157 2002/12/12 12:37:01 t-momose Exp $ */

/*
* Copyright (C) 2001 WIDE Project. All rights reserved.
Expand Down Expand Up @@ -2742,7 +2742,8 @@ mip6_bc_encapcheck(m, off, proto, arg)
}

ip6 = mtod(m, struct ip6_hdr*);
if (ip6_getpktaddrs((struct mbuf *)m, &encap_src, &encap_dst))
if (ip6_findaux((struct mbuf *)m) &&
ip6_getpktaddrs((struct mbuf *)m, &encap_src, &encap_dst))
return (0);

mnaddr = &mbc->mbc_pcoa;
Expand Down

0 comments on commit 7744d65

Please sign in to comment.