View | Details | Raw Unified | Return to bug 29345 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/src/sys/netinet6/in6_ifattach.c (+7 lines)
Lines 47-56 Link Here
47
#include <netinet/in.h>
47
#include <netinet/in.h>
48
#include <netinet/in_var.h>
48
#include <netinet/in_var.h>
49
#include <netinet/if_ether.h>
49
#include <netinet/if_ether.h>
50
#include <netinet/in_pcb.h>
50
51
51
#include <netinet/ip6.h>
52
#include <netinet/ip6.h>
52
#include <netinet6/ip6_var.h>
53
#include <netinet6/ip6_var.h>
53
#include <netinet6/in6_var.h>
54
#include <netinet6/in6_var.h>
55
#include <netinet6/in6_pcb.h>
54
#include <netinet6/in6_ifattach.h>
56
#include <netinet6/in6_ifattach.h>
55
#include <netinet6/ip6_var.h>
57
#include <netinet6/ip6_var.h>
56
#include <netinet6/nd6.h>
58
#include <netinet6/nd6.h>
Lines 72-77 Link Here
72
74
73
struct callout in6_tmpaddrtimer_ch;
75
struct callout in6_tmpaddrtimer_ch;
74
76
77
extern struct inpcbinfo udbinfo;
78
extern struct inpcbinfo ripcbinfo;
79
75
static int get_rand_ifid __P((struct ifnet *, struct in6_addr *));
80
static int get_rand_ifid __P((struct ifnet *, struct in6_addr *));
76
static int generate_tmp_ifid __P((u_int8_t *, const u_int8_t *, u_int8_t *));
81
static int generate_tmp_ifid __P((u_int8_t *, const u_int8_t *, u_int8_t *));
77
static int get_hw_ifid __P((struct ifnet *, struct in6_addr *));
82
static int get_hw_ifid __P((struct ifnet *, struct in6_addr *));
Lines 942-947 Link Here
942
	}
947
	}
943
948
944
	/* leave from all multicast groups joined */
949
	/* leave from all multicast groups joined */
950
	in6_pcbpurgeif0(LIST_FIRST(udbinfo.listhead), ifp);
951
	in6_pcbpurgeif0(LIST_FIRST(ripcbinfo.listhead), ifp);
945
	for (in6m = LIST_FIRST(&in6_multihead); in6m; in6m = in6m_next) {
952
	for (in6m = LIST_FIRST(&in6_multihead); in6m; in6m = in6m_next) {
946
		in6m_next = LIST_NEXT(in6m, in6m_entry);
953
		in6m_next = LIST_NEXT(in6m, in6m_entry);
947
		if (in6m->in6m_ifp != ifp)
954
		if (in6m->in6m_ifp != ifp)
(-)/usr/src/sys/netinet6/in6_pcb.c (+39 lines)
Lines 932-937 Link Here
932
	}
932
	}
933
}
933
}
934
934
935
void
936
in6_pcbpurgeif0(head, ifp)
937
	struct in6pcb *head;
938
	struct ifnet *ifp;
939
{
940
	struct in6pcb *in6p;
941
	struct ip6_moptions *im6o;
942
	struct in6_multi_mship *imm, *nimm;
943
944
	for (in6p = head; in6p != NULL; in6p = LIST_NEXT(in6p, inp_list)) {
945
		im6o = in6p->in6p_moptions;
946
		if ((in6p->inp_vflag & INP_IPV6) &&
947
		    im6o) {
948
			/*
949
			 * Unselect the outgoing interface if it is being
950
			 * detached.
951
			 */
952
			if (im6o->im6o_multicast_ifp == ifp)
953
				im6o->im6o_multicast_ifp = NULL;
954
955
			/*
956
			 * Drop multicast group membership if we joined
957
			 * through the interface being detached.
958
			 * XXX controversial - is it really legal for kernel
959
			 * to force this?
960
			 */
961
			for (imm = im6o->im6o_memberships.lh_first;
962
			     imm != NULL; imm = nimm) {
963
				nimm = imm->i6mm_chain.le_next;
964
				if (imm->i6mm_maddr->in6m_ifp == ifp) {
965
					LIST_REMOVE(imm, i6mm_chain);
966
					in6_delmulti(imm->i6mm_maddr);
967
					free(imm, M_IPMADDR);
968
				}
969
			}
970
		}
971
	}
972
}
973
935
/*
974
/*
936
 * Check for alternatives when higher level complains
975
 * Check for alternatives when higher level complains
937
 * about service problems.  For now, invalidate cached
976
 * about service problems.  For now, invalidate cached
(-)/usr/src/sys/netinet6/in6_pcb.h (+1 lines)
Lines 74-79 Link Here
74
#define	sin6tosa(sin6)	((struct sockaddr *)(sin6))
74
#define	sin6tosa(sin6)	((struct sockaddr *)(sin6))
75
#define	ifatoia6(ifa)	((struct in6_ifaddr *)(ifa))
75
#define	ifatoia6(ifa)	((struct in6_ifaddr *)(ifa))
76
76
77
void	in6_pcbpurgeif0 __P((struct in6pcb *, struct ifnet *));
77
void	in6_losing __P((struct inpcb *));
78
void	in6_losing __P((struct inpcb *));
78
int	in6_pcballoc __P((struct socket *, struct inpcbinfo *, struct proc *));
79
int	in6_pcballoc __P((struct socket *, struct inpcbinfo *, struct proc *));
79
int	in6_pcbbind __P((struct inpcb *, struct sockaddr *, struct proc *));
80
int	in6_pcbbind __P((struct inpcb *, struct sockaddr *, struct proc *));

Return to bug 29345