Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Delete link local addresses of a vlan interface when...



details:   https://anonhg.NetBSD.org/src/rev/96977a8c90af
branches:  trunk
changeset: 332310:96977a8c90af
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Mon Sep 15 06:07:37 2014 +0000

description:
Delete link local addresses of a vlan interface when detaching its parent

This fixes PR 49197.

diffstat:

 sys/net/if_vlan.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (39 lines):

diff -r 0d22fb08d2bd -r 96977a8c90af sys/net/if_vlan.c
--- a/sys/net/if_vlan.c Mon Sep 15 05:54:02 2014 +0000
+++ b/sys/net/if_vlan.c Mon Sep 15 06:07:37 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_vlan.c,v 1.73 2014/09/15 05:54:02 ozaki-r Exp $     */
+/*     $NetBSD: if_vlan.c,v 1.74 2014/09/15 06:07:37 ozaki-r Exp $     */
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.73 2014/09/15 05:54:02 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.74 2014/09/15 06:07:37 ozaki-r Exp $");
 
 #include "opt_inet.h"
 
@@ -103,6 +103,9 @@
 #include <netinet/in.h>
 #include <netinet/if_inarp.h>
 #endif
+#ifdef INET6
+#include <netinet6/in6_ifattach.h>
+#endif
 
 struct vlan_mc_entry {
        LIST_ENTRY(vlan_mc_entry)       mc_entries;
@@ -400,6 +403,10 @@
        ifv->ifv_if.if_mtu = 0;
        ifv->ifv_flags = 0;
 
+#ifdef INET6
+       /* To delete v6 link local addresses */
+       in6_ifdetach(ifp);
+#endif
        if ((ifp->if_flags & IFF_PROMISC) != 0)
                ifpromisc(ifp, 0);
        if_down(ifp);



Home | Main Index | Thread Index | Old Index