Re: kern/127050: [carp] ipv6 does not work on carp interfaces [regression]

2011-08-22 Thread Paul Herman

On 8/21/2011 1:47 AM, Ask Bjørn Hansen wrote:


On Aug 19, 2011, at 1:30, Paul Herman wrote:


--010305010708060807000808
Content-Type: application/gzip;
  name=carp_ip6_alias.patch.gz
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
  filename=carp_ip6_alias.patch.gz


I wanted to try it, but gzip doesn't seem to like that file …

(downloaded from http://www.freebsd.org/cgi/query-pr.cgi?pr=127050cat= )


It's base64 encoded of course -- works for me when I pipe the text into
  openssl base64 -d | zcat

(zipped to preserve white spacing) For those craving instant 
satisfaction, here it is in plain text.


-Paul.

--- sys/netinet/ip_carp.c.orig  2011-08-19 07:52:56.0 +
+++ sys/netinet/ip_carp.c 2011-08-19 07:15:03.0 +
@@ -1670,9 +1670,11 @@
struct carp_if *cif;
struct in6_ifaddr *ia, *ia_if;
struct ip6_moptions *im6o = sc-sc_im6o;
+   struct in6_multi *in6m;
struct in6_addr in6;
int own, error;

+
error = 0;

if (IN6_IS_ADDR_UNSPECIFIED(sin6-sin6_addr)) {
@@ -1729,8 +1731,6 @@
}

if (!sc-sc_naddrs6) {
-  struct in6_multi *in6m;
-
   im6o-im6o_multicast_ifp = ifp;

   /* join CARP multicast address */
@@ -1745,24 +1745,24 @@
goto cleanup;
   im6o-im6o_membership[0] = in6m;
   im6o-im6o_num_memberships++;
-
-  /* join solicited multicast address */
-  bzero(in6, sizeof(in6));
-  in6.s6_addr16[0] = htons(0xff02);
-  in6.s6_addr32[1] = 0;
-  in6.s6_addr32[2] = htonl(1);
-  in6.s6_addr32[3] = sin6-sin6_addr.s6_addr32[3];
-  in6.s6_addr8[12] = 0xff;
-  if (in6_setscope(in6, ifp, NULL) != 0)
-   goto cleanup;
-  in6m = NULL;
-  error = in6_mc_join(ifp, in6, NULL, in6m, 0);
-  if (error)
-   goto cleanup;
-  im6o-im6o_membership[1] = in6m;
-  im6o-im6o_num_memberships++;
}

+   /* join solicited multicast address */
+   bzero(in6, sizeof(in6));
+   in6.s6_addr16[0] = htons(0xff02);
+   in6.s6_addr32[1] = 0;
+   in6.s6_addr32[2] = htonl(1);
+   in6.s6_addr32[3] = sin6-sin6_addr.s6_addr32[3];
+   in6.s6_addr8[12] = 0xff;
+   if (in6_setscope(in6, ifp, NULL) != 0)
+  goto cleanup;
+   in6m = NULL;
+   error = in6_mc_join(ifp, in6, NULL, in6m, 0);
+   if (error)
+  goto cleanup;
+   im6o-im6o_membership[1] = in6m;
+   im6o-im6o_num_memberships++;
+
if (!ifp-if_carp) {
   cif = malloc(sizeof(*cif), M_CARP,
   M_WAITOK|M_ZERO);
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


Current problem reports assigned to freebsd-net@FreeBSD.org

2011-08-22 Thread FreeBSD bugmaster
Note: to view an individual PR, use:
  http://www.freebsd.org/cgi/query-pr.cgi?pr=(number).

The following is a listing of current problems submitted by FreeBSD users.
These represent problem reports covering all versions including
experimental development code and obsolete releases.


S Tracker  Resp.  Description

o kern/159817  net[udp] write UDPv4: No buffer space available (code=55)
o kern/159795  net[tcp] excessive duplicate ACKs and TCP session freezes
o kern/159629  net[ipsec] [panic] kernel panic with IPsec in transport m
o kern/159621  net[tcp] [panic] panic: soabort: so_count
o kern/159603  net[netinet] [patch] in_ifscrubprefix() - network route c
o kern/159602  net[netinet] [patch] arp_ifscrub() is called even if IFF_
o kern/159601  net[netinet] [patch] in_scrubprefix() - loopback route re
o kern/159353  net[netinet] [patch] conditional call of ifa_del_loopback
o kern/159294  net[em] em watchdog timeouts
o kern/159203  net[wpi] Intel 3945ABG Wireless LAN not support IBSS
o kern/158930  net[bpf] BPF element leak in ifp-bpf_if-bif_dlist
o kern/158726  net[ip6] [patch] ICMPv6 Router Announcement flooding limi
o kern/158694  net[ix] [lagg] ix0 is not working within lagg(4)
o kern/158665  net[ip6] [panic] kernel pagefault in in6_setscope()
o kern/158635  net[em] TSO breaks BPF packet captures with em driver
f kern/158426  net[e1000] [panic] _mtx_lock_sleep: recursed on non-recur
o kern/158156  net[bce] bce driver shows no carrier on IBM blade (HS22
f kern/157802  net[dummynet] [panic] kernel panic in dummynet
o kern/157785  netamd64 + jail + ipfw + natd = very slow outbound traffi
o kern/157429  net[re] Realtek RTL8169 doesn't work with re(4)
o kern/157418  net[em] em driver lockup during boot on Supermicro X9SCM-
o kern/157410  net[ip6] IPv6 Router Advertisements Cause Excessive CPU U
o kern/157287  net[re] [panic] INVARIANTS panic (Memory modified after f
o kern/157209  net[ip6] [patch] locking error in rip6_input() (sys/netin
o kern/157200  net[network.subr] [patch] stf(4) can not communicate betw
o kern/157182  net[lagg] lagg interface not working together with epair 
o kern/156877  net[dummynet] [panic] dummynet move_pkt() null ptr derefe
o kern/156667  net[em] em0 fails to init on CURRENT after March 17
o kern/156408  net[vlan] Routing failure when using VLANs vs. Physical e
o kern/156328  net[icmp]: host can ping other subnet but no have IP from
o kern/156317  net[ip6] Wrong order of IPv6 NS DAD/MLD Report
o kern/156283  net[ip6] [patch] nd6_ns_input - rtalloc_mpath does not re
o kern/156279  net[if_bridge][divert][ipfw] unable to correctly re-injec
o kern/156226  net[lagg]: failover does not announce the failover to swi
o kern/156030  net[ip6] [panic] Crash in nd6_dad_start() due to null ptr
o kern/155772  netifconfig(8): ioctl (SIOCAIFADDR): File exists on direc
o kern/155680  net[multicast] problems with multicast
s kern/155642  net[request] Add driver for Realtek RTL8191SE/RTL8192SE W
o kern/155604  net[flowtable] Flowtable excessively caches dest MAC addr
o kern/155597  net[panic] Kernel panics with sbdrop message
o kern/155585  net[tcp] [panic] tcp_output tcp_mtudisc loop until kernel
o kern/155420  net[vlan] adding vlan break existent vlan
o bin/155365   net[patch] routed(8): if.c in routed fails to compile if 
o kern/155177  net[route] [panic] Panic when inject routes in kernel
o kern/155030  net[igb] igb(4) DEVICE_POLLING does not work with carp(4)
o kern/155010  net[msk] ntfs-3g via iscsi using msk driver cause kernel 
o kern/155004  net[bce] [panic] kernel panic in bce0 driver
o kern/154943  net[gif] ifconfig gifX create on existing gifX clears IP
s kern/154851  net[request]: Port brcm80211 driver from Linux to FreeBSD
o kern/154850  net[netgraph] [patch] ng_ether fails to name nodes when t
o kern/154679  net[em] Fatal trap 12: em1 taskq only at startup (8.1-R
o kern/154600  net[tcp] [panic] Random kernel panics on tcp_output
o kern/154557  net[tcp] Freeze tcp-session of the clients, if in the gat
o kern/154443  net[if_bridge] Kernel module bridgestp.ko missing after u
o kern/154286  net[netgraph] [panic] 8.2-PRERELEASE panic in netgraph
o kern/154255  net[nfs] NFS not responding
o kern/154214  net[stf] [panic] Panic when creating stf interface
o kern/154185  netrace condition in mb_dupcl
o kern/154169  net[multicast] [ip6] Node Information Query multicast add
o kern/154134  net[ip6] stuck kernel state in LISTEN on ipv6 

Re: BETA1 IPv6 crash

2011-08-22 Thread Sergey Kandaurov
On 8 August 2011 22:06, Tom Vijlbrief tom.vijlbr...@xs4all.nl wrote:
 2011/8/7 Sergey Kandaurov pluk...@gmail.com:
 On 7 August 2011 17:11, Tom Vijlbrief tom.vijlbr...@xs4all.nl wrote:
 I installed BETA1 in a fresh ubuntu 11.04 KVM virtual machine with the
 new installer.

 Major issue I noticed was the missing /home.

 It took me quite some time to get IPv6 working in the guest (a Linux
 configuration issue), but now that it works
 BETA1 panics in about 50% of the boot attempts:

 testbsd dumped core - see /var/crash/vmcore.0

 Sun Aug  7 08:25:28 CEST 2011

 FreeBSD testbsd 9.0-BETA1 FreeBSD 9.0-BETA1 #0: Thu Jul 28 16:34:16
 UTC 2011     r...@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
 i386

 panic: _mtx_lock_sleep: recursed on non-recursive mutex if_addr_mtx @
 /usr/src/sys/netinet6/mld6.c:1676

 GNU gdb 6.1.1 [FreeBSD]
 Copyright 2004 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain 
 conditions.
 Type show copying to see the conditions.
 There is absolutely no warranty for GDB.  Type show warranty for details.
 This GDB was configured as i386-marcel-freebsd...
 [..]
 panic: _mtx_lock_sleep: recursed on non-recursive mutex if_addr_mtx @
 /usr/src/sys/netinet6/mld6.c:1676

 cpuid = 0
 KDB: enter: panic
 Uptime: 28s
 Physical memory: 491 MB
 Dumping 45 MB: 30 14

 #0  doadump (textdump=1) at pcpu.h:244
 244     pcpu.h: No such file or directory.
        in pcpu.h
 (kgdb) #0  doadump (textdump=1) at pcpu.h:244
 #1  0xc0a04965 in kern_reboot (howto=260)
    at /usr/src/sys/kern/kern_shutdown.c:430
 #2  0xc0a04291 in panic (fmt=Variable fmt is not available.
 ) at /usr/src/sys/kern/kern_shutdown.c:595
 #3  0xc09f4a4a in _mtx_lock_sleep (m=0xc35f3a28, tid=3278693824, opts=0,
    file=0xc0f1ab65 /usr/src/sys/netinet6/mld6.c, line=1676)
    at /usr/src/sys/kern/kern_mutex.c:341
 #4  0xc09f4c67 in _mtx_lock_flags (m=0xc35f3a28, opts=0,
    file=0xc0f1ab65 /usr/src/sys/netinet6/mld6.c, line=1676)
    at /usr/src/sys/kern/kern_mutex.c:203
 #5  0xc0bbf007 in mld_set_version (mli=0xc3589a00, version=Variable
 version is not available.
 )
    at /usr/src/sys/netinet6/mld6.c:1676
 #6  0xc0bc0c00 in mld_input (m=0xc3951e00, off=48, icmp6len=24)
    at /usr/src/sys/netinet6/mld6.c:690
 #7  0xc0ba5696 in icmp6_input (mp=0xc3313a54, offp=0xc3313a68, proto=58)
    at /usr/src/sys/netinet6/icmp6.c:654
 #8  0xc0bba23a in ip6_input (m=0xc3951e00)
    at /usr/src/sys/netinet6/ip6_input.c:964
 #9  0xc0ac9b1c in netisr_dispatch_src (proto=10, source=0, m=0xc3951e00)
    at /usr/src/sys/net/netisr.c:1013
 #10 0xc0ac9da0 in netisr_dispatch (proto=10, m=0xc3951e00)
    at /usr/src/sys/net/netisr.c:1104
 #11 0xc0abecf1 in ether_demux (ifp=0xc35f3800, m=0xc3951e00)
    at /usr/src/sys/net/if_ethersubr.c:936
 #12 0xc0abf1b3 in ether_nh_input (m=0xc3951e00)
    at /usr/src/sys/net/if_ethersubr.c:755
 #13 0xc0ac9b1c in netisr_dispatch_src (proto=9, source=0, m=0xc3951e00)
    at /usr/src/sys/net/netisr.c:1013
 #14 0xc0ac9da0 in netisr_dispatch (proto=9, m=0xc3951e00)
    at /usr/src/sys/net/netisr.c:1104
 #15 0xc0abe7f5 in ether_input (ifp=0xc35f3800, m=0xc3951e00)
    at /usr/src/sys/net/if_ethersubr.c:796
 #16 0xc0672bc9 in lem_handle_rxtx (context=0xc3732000, pending=1)
    at /usr/src/sys/dev/e1000/if_lem.c:3554
 #17 0xc0a468ab in taskqueue_run_locked (queue=0xc359ca80)
    at /usr/src/sys/kern/subr_taskqueue.c:306
 #18 0xc0a47307 in taskqueue_thread_loop (arg=0xc37365ec)
    at /usr/src/sys/kern/subr_taskqueue.c:495
 #19 0xc09d7af8 in fork_exit (callout=0xc0a472a0 taskqueue_thread_loop,
    arg=0xc37365ec, frame=0xc3313d28) at /usr/src/sys/kern/kern_fork.c:941
 #20 0xc0d1d714 in fork_trampoline () at 
 /usr/src/sys/i386/i386/exception.s:275
 (kgdb)


 This is the same as in PR kern/158426.
 Can you try the patch from PR followup and report us whether it helps?
 Full link to PR with patch:
 http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/158426


 I applied the patch and tried about 15 reboots and all went fine


Hi, Tom.
A better fix for this problem has been developed since then. Would you
please try it as well? For doing that, you need to revert a previous
patch and apply this one.
Please report if this change also fixes the panic for you, so it  has
better chances to get into 9.0 release.


Index: sys/netinet6/mld6.c
===
--- sys/netinet6/mld6.c (revision 224471)
+++ sys/netinet6/mld6.c (working copy)
@@ -680,7 +680,6 @@ mld_v1_input_query(struct ifnet *ifp, const struct

IN6_MULTI_LOCK();
MLD_LOCK();
-   IF_ADDR_LOCK(ifp);

/*
 * Switch to MLDv1 host compatibility mode.
@@ -693,6 +692,7 @@ mld_v1_input_query(struct ifnet *ifp, const struct
if (timer == 0)
timer = 1;

+   IF_ADDR_LOCK(ifp);
if (is_general_query) {
/*
 * For 

Re: BETA1 IPv6 crash

2011-08-22 Thread Tom Vijlbrief
2011/8/22 Sergey Kandaurov pluk...@gmail.com:
 On 8 August 2011 22:06, Tom Vijlbrief tom.vijlbr...@xs4all.nl wrote:
 2011/8/7 Sergey Kandaurov pluk...@gmail.com:
 On 7 August 2011 17:11, Tom Vijlbrief tom.vijlbr...@xs4all.nl wrote:
 I installed BETA1 in a fresh ubuntu 11.04 KVM virtual machine with the
 new installer.

 Major issue I noticed was the missing /home.

 It took me quite some time to get IPv6 working in the guest (a Linux
 configuration issue), but now that it works
 BETA1 panics in about 50% of the boot attempts:

 testbsd dumped core - see /var/crash/vmcore.0

 Sun Aug  7 08:25:28 CEST 2011

 FreeBSD testbsd 9.0-BETA1 FreeBSD 9.0-BETA1 #0: Thu Jul 28 16:34:16
 UTC 2011     r...@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
 i386

 panic: _mtx_lock_sleep: recursed on non-recursive mutex if_addr_mtx @
 /usr/src/sys/netinet6/mld6.c:1676

 GNU gdb 6.1.1 [FreeBSD]
 Copyright 2004 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you 
 are
 welcome to change it and/or distribute copies of it under certain 
 conditions.
 Type show copying to see the conditions.
 There is absolutely no warranty for GDB.  Type show warranty for details.
 This GDB was configured as i386-marcel-freebsd...
 [..]
 panic: _mtx_lock_sleep: recursed on non-recursive mutex if_addr_mtx @
 /usr/src/sys/netinet6/mld6.c:1676

 cpuid = 0
 KDB: enter: panic
 Uptime: 28s
 Physical memory: 491 MB
 Dumping 45 MB: 30 14

 #0  doadump (textdump=1) at pcpu.h:244
 244     pcpu.h: No such file or directory.
        in pcpu.h
 (kgdb) #0  doadump (textdump=1) at pcpu.h:244
 #1  0xc0a04965 in kern_reboot (howto=260)
    at /usr/src/sys/kern/kern_shutdown.c:430
 #2  0xc0a04291 in panic (fmt=Variable fmt is not available.
 ) at /usr/src/sys/kern/kern_shutdown.c:595
 #3  0xc09f4a4a in _mtx_lock_sleep (m=0xc35f3a28, tid=3278693824, opts=0,
    file=0xc0f1ab65 /usr/src/sys/netinet6/mld6.c, line=1676)
    at /usr/src/sys/kern/kern_mutex.c:341
 #4  0xc09f4c67 in _mtx_lock_flags (m=0xc35f3a28, opts=0,
    file=0xc0f1ab65 /usr/src/sys/netinet6/mld6.c, line=1676)
    at /usr/src/sys/kern/kern_mutex.c:203
 #5  0xc0bbf007 in mld_set_version (mli=0xc3589a00, version=Variable
 version is not available.
 )
    at /usr/src/sys/netinet6/mld6.c:1676
 #6  0xc0bc0c00 in mld_input (m=0xc3951e00, off=48, icmp6len=24)
    at /usr/src/sys/netinet6/mld6.c:690
 #7  0xc0ba5696 in icmp6_input (mp=0xc3313a54, offp=0xc3313a68, proto=58)
    at /usr/src/sys/netinet6/icmp6.c:654
 #8  0xc0bba23a in ip6_input (m=0xc3951e00)
    at /usr/src/sys/netinet6/ip6_input.c:964
 #9  0xc0ac9b1c in netisr_dispatch_src (proto=10, source=0, m=0xc3951e00)
    at /usr/src/sys/net/netisr.c:1013
 #10 0xc0ac9da0 in netisr_dispatch (proto=10, m=0xc3951e00)
    at /usr/src/sys/net/netisr.c:1104
 #11 0xc0abecf1 in ether_demux (ifp=0xc35f3800, m=0xc3951e00)
    at /usr/src/sys/net/if_ethersubr.c:936
 #12 0xc0abf1b3 in ether_nh_input (m=0xc3951e00)
    at /usr/src/sys/net/if_ethersubr.c:755
 #13 0xc0ac9b1c in netisr_dispatch_src (proto=9, source=0, m=0xc3951e00)
    at /usr/src/sys/net/netisr.c:1013
 #14 0xc0ac9da0 in netisr_dispatch (proto=9, m=0xc3951e00)
    at /usr/src/sys/net/netisr.c:1104
 #15 0xc0abe7f5 in ether_input (ifp=0xc35f3800, m=0xc3951e00)
    at /usr/src/sys/net/if_ethersubr.c:796
 #16 0xc0672bc9 in lem_handle_rxtx (context=0xc3732000, pending=1)
    at /usr/src/sys/dev/e1000/if_lem.c:3554
 #17 0xc0a468ab in taskqueue_run_locked (queue=0xc359ca80)
    at /usr/src/sys/kern/subr_taskqueue.c:306
 #18 0xc0a47307 in taskqueue_thread_loop (arg=0xc37365ec)
    at /usr/src/sys/kern/subr_taskqueue.c:495
 #19 0xc09d7af8 in fork_exit (callout=0xc0a472a0 taskqueue_thread_loop,
    arg=0xc37365ec, frame=0xc3313d28) at /usr/src/sys/kern/kern_fork.c:941
 #20 0xc0d1d714 in fork_trampoline () at 
 /usr/src/sys/i386/i386/exception.s:275
 (kgdb)


 This is the same as in PR kern/158426.
 Can you try the patch from PR followup and report us whether it helps?
 Full link to PR with patch:
 http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/158426


 I applied the patch and tried about 15 reboots and all went fine


 Hi, Tom.
 A better fix for this problem has been developed since then. Would you
 please try it as well? For doing that, you need to revert a previous
 patch and apply this one.
 Please report if this change also fixes the panic for you, so it  has
 better chances to get into 9.0 release.


 Index: sys/netinet6/mld6.c
 ===
 --- sys/netinet6/mld6.c (revision 224471)
 +++ sys/netinet6/mld6.c (working copy)
 @@ -680,7 +680,6 @@ mld_v1_input_query(struct ifnet *ifp, const struct

        IN6_MULTI_LOCK();
        MLD_LOCK();
 -       IF_ADDR_LOCK(ifp);

        /*
         * Switch to MLDv1 host compatibility mode.
 @@ -693,6 +692,7 @@ mld_v1_input_query(struct ifnet *ifp, const struct
        if (timer == 0)
                timer = 1;

 +       IF_ADDR_LOCK(ifp);
        if 

Re: kern/158426: commit references a PR

2011-08-22 Thread dfilter service
The following reply was made to PR kern/158426; it has been noted by GNATS.

From: dfil...@freebsd.org (dfilter service)
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: kern/158426: commit references a PR
Date: Mon, 22 Aug 2011 23:39:50 + (UTC)

 Author: pluknet
 Date: Mon Aug 22 23:39:40 2011
 New Revision: 225096
 URL: http://svn.freebsd.org/changeset/base/225096
 
 Log:
   Fix if_addr_mtx recursion in mld6.
   
   mld_set_version() is called only from mld_v1_input_query() and
   mld_v2_input_query() both holding the if_addr_mtx lock, and then calling
   into mld_v2_cancel_link_timers() acquires it the second time, which results
   in mtx recursion. To avoid that, delay if_addr_mtx acquisition until after
   mld_set_version() is called; while here, further reduce locking scope
   to protect only the needed pieces: if_multiaddrs, in6m_lookup_locked().
   
   PR:  kern/158426
   Reported by: Thomas tps vr-web.de,
Tom Vijlbrief tom.vijlbrief xs4all.nl
   Tested by:   Tom Vijlbrief
   Reviewed by: bz
   Approved by: re (kib)
 
 Modified:
   head/sys/netinet6/mld6.c
 
 Modified: head/sys/netinet6/mld6.c
 ==
 --- head/sys/netinet6/mld6.c   Mon Aug 22 23:27:23 2011(r225095)
 +++ head/sys/netinet6/mld6.c   Mon Aug 22 23:39:40 2011(r225096)
 @@ -680,7 +680,6 @@ mld_v1_input_query(struct ifnet *ifp, co
  
IN6_MULTI_LOCK();
MLD_LOCK();
 -  IF_ADDR_LOCK(ifp);
  
/*
 * Switch to MLDv1 host compatibility mode.
 @@ -693,6 +692,7 @@ mld_v1_input_query(struct ifnet *ifp, co
if (timer == 0)
timer = 1;
  
 +  IF_ADDR_LOCK(ifp);
if (is_general_query) {
/*
 * For each reporting group joined on this
 @@ -888,7 +888,6 @@ mld_v2_input_query(struct ifnet *ifp, co
  
IN6_MULTI_LOCK();
MLD_LOCK();
 -  IF_ADDR_LOCK(ifp);
  
mli = MLD_IFINFO(ifp);
KASSERT(mli != NULL, (%s: no mld_ifinfo for ifp %p, __func__, ifp));
 @@ -936,14 +935,18 @@ mld_v2_input_query(struct ifnet *ifp, co
 * Queries for groups we are not a member of on this
 * link are simply ignored.
 */
 +  IF_ADDR_LOCK(ifp);
inm = in6m_lookup_locked(ifp, mld-mld_addr);
 -  if (inm == NULL)
 +  if (inm == NULL) {
 +  IF_ADDR_UNLOCK(ifp);
goto out_locked;
 +  }
if (nsrc  0) {
if (!ratecheck(inm-in6m_lastgsrtv,
V_mld_gsrdelay)) {
CTR1(KTR_MLD, %s: GS query throttled.,
__func__);
 +  IF_ADDR_UNLOCK(ifp);
goto out_locked;
}
}
 @@ -961,10 +964,10 @@ mld_v2_input_query(struct ifnet *ifp, co
  
/* XXX Clear embedded scope ID as userland won't expect it. */
in6_clearscope(mld-mld_addr);
 +  IF_ADDR_UNLOCK(ifp);
}
  
  out_locked:
 -  IF_ADDR_UNLOCK(ifp);
MLD_UNLOCK();
IN6_MULTI_UNLOCK();
  
 ___
 svn-src-...@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
 
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


Re: kern/158426: [e1000] [panic] _mtx_lock_sleep: recursed on non-recursive mutex if_addr_mtx @ /usr/src/sys/netinet6/mld6.c:1676

2011-08-22 Thread pluknet
Synopsis: [e1000] [panic] _mtx_lock_sleep: recursed on non-recursive mutex 
if_addr_mtx @ /usr/src/sys/netinet6/mld6.c:1676

State-Changed-From-To: feedback-closed
State-Changed-By: pluknet
State-Changed-When: Mon Aug 22 23:42:16 UTC 2011
State-Changed-Why: 
A different fix was committed in svn r225096.

http://www.freebsd.org/cgi/query-pr.cgi?pr=158426
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


Re: kern/158426: [e1000] [panic] _mtx_lock_sleep: recursed on non-recursive mutex if_addr_mtx @ /usr/src/sys/netinet6/mld6.c:1676

2011-08-22 Thread pluknet
Synopsis: [e1000] [panic] _mtx_lock_sleep: recursed on non-recursive mutex 
if_addr_mtx @ /usr/src/sys/netinet6/mld6.c:1676

Responsible-Changed-From-To: freebsd-net-pluknet
Responsible-Changed-By: pluknet
Responsible-Changed-When: Mon Aug 22 23:44:24 UTC 2011
Responsible-Changed-Why: 
Track.

http://www.freebsd.org/cgi/query-pr.cgi?pr=158426
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


MPD as LAC + Radius

2011-08-22 Thread Gruel Bruno
Hello,

I use MPD on FreeBSD 8.2 as LAC but i can't (or don't hnow how) check 
(user/password) off the pppoe client before forwarding the connection.

I try a lot off variant on my mpd.conf without success.

This is my config file (mpd.conf) :

default:
load killa_lac

killa_lac:
create link template L1 pppoe
set pppoe iface le0
load radius
set link enable multilink
set link action forward L2
set link enable incoming
create link template L2 l2tp
set l2tp peer X.X.X.X
set l2tp secret x

radius:
set radius server X.X.X.X killa_lac
set radius retries 3
set radius timeout 3
set radius me X.X.X.X
set auth acct-update 300
set auth enable radius-auth
set auth enable radius-acct
set radius disable message-authentic


Have got a idea ?

Thank's

Bruno Gruel


This message has been scanned for viruses and
dangerous content by  Amavisd-new, and is
believed to be clean.

___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


ifconfig -alias with duplicate netmasks work?

2011-08-22 Thread John
Fellow Net'ers

   Debugging an nfs locking problem to a linux host, I accidently
issued some ifconfig commands on the bsd server (9-current) and
found that duplicate netmasks seem to work fine. For instance:

bce0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500

options=c01bbRXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO,LINKSTATE
ether d4:85:64:66:2a:14
inet6 fe80::d685:64ff:fe66:2a14%bce0 prefixlen 64 scopeid 0x1 
inet 10.24.99.127 netmask 0x broadcast 10.24.255.255
inet 10.24.99.128 netmask 0x broadcast 10.24.255.255
inet 10.24.99.126 netmask 0x broadcast 10.24.255.255
nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
media: Ethernet autoselect (1000baseT full-duplex)
status: active

via the commands:

ifconfig bce0 inet 10.24.99.127 netmask 0x broadcast 10.24.255.255
ifconfig bce0 inet 10.24.99.128 netmask 0x broadcast 10.24.255.255 alias
ifconfig bce0 inet 10.24.99.126 netmask 0x broadcast 10.24.255.255 alias

The man page for ifconfig says one 'must' use a different netmask,
typically 0x. However, everything still seems to work ok.

Has something changed, is the manpage wrong, am I totally missing
something?

Thanks,
John

man ifconfig

If the address
is on the same subnet as the first network address for this
interface, a non-conflicting netmask must be given.  Usually
0x is most appropriate.
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


Re: ifconfig -alias with duplicate netmasks work?

2011-08-22 Thread Doug Barton
On 08/22/2011 16:49, John wrote:
 Fellow Net'ers
 
Debugging an nfs locking problem to a linux host, I accidently
 issued some ifconfig commands on the bsd server (9-current) and
 found that duplicate netmasks seem to work fine. For instance:
 
 bce0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500
   
 options=c01bbRXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO,LINKSTATE
   ether d4:85:64:66:2a:14
   inet6 fe80::d685:64ff:fe66:2a14%bce0 prefixlen 64 scopeid 0x1 
   inet 10.24.99.127 netmask 0x broadcast 10.24.255.255
   inet 10.24.99.128 netmask 0x broadcast 10.24.255.255
   inet 10.24.99.126 netmask 0x broadcast 10.24.255.255
   nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
   media: Ethernet autoselect (1000baseT full-duplex)
   status: active

My experience on 8.x is that this will work for most things, but then
fail in odd ways. You're still better off following the old advice of
making the aliases for the same network have the all-1s netmask.


-- 

Nothin' ever doesn't change, but nothin' changes much.
-- OK Go

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


Statistics collection broken in new dummynet

2011-08-22 Thread Peter Jeremy
I have been using dummynet(4) to do traffic shaping for simulated WANs
for over a decade now and it has been very effective - thanks Luigi.

I am currently looking at migrating the network simulator from 7.1 to
8.2 and have noticed that the statistics reported are now meaningless.
Instead of reporting cumulative statistics, it now appears to reset
them regularly - apparently whenever the pipe is empty.

Sample results from 7.1 (currently inactive):
00224:   2.000 Mbit/s9 ms  64 KB 1 queues (1 buckets) droptail
mask: 0x00 0x/0x - 0x/0x
BKT Prot ___Source IP/port Dest. IP/port Tot_pkt/bytes Pkt/Byte Drp
  0 udp  192.168.224.183/0 192.168.216.179/0 5404902 598099622  00  
 0

Sample results from 8.2 (currently active simulator):
00224:   2.000 Mbit/s   18 ms burst 0 
q131296 64 KB 0 flows (1 buckets) sched 65760 weight 0 lmax 0 pri 0 droptail
 sched 65760 type FIFO flags 0x0 0 buckets 1 active
  0 ip   0.0.0.0/0 0.0.0.0/02 1785  00   0
(and most of the time, the last line doesn't appear).

I have checked a recent 9.0-BETA1 and it is still broken.  Looking at
the dummynet.txt file, I cannot see this mentioned.  I have looked
through the source and it does appear that scheduler instances are
marked inactive in serve_sched() once they have no packets queued and
are then garbage-collected via drain_scheduler_cb().  Is this the
intent?  If so, how can statistics be collected?

-- 
Peter Jeremy


pgpzud9JhB4U3.pgp
Description: PGP signature


Re: Statistics collection broken in new dummynet

2011-08-22 Thread Luigi Rizzo
On Tue, Aug 23, 2011 at 09:07:51AM +1000, Peter Jeremy wrote:
 I have been using dummynet(4) to do traffic shaping for simulated WANs
 for over a decade now and it has been very effective - thanks Luigi.
 
 I am currently looking at migrating the network simulator from 7.1 to
 8.2 and have noticed that the statistics reported are now meaningless.
 Instead of reporting cumulative statistics, it now appears to reset
 them regularly - apparently whenever the pipe is empty.
...
it's not that the stats are reset, it is that pipes and queues
are deleted when they carry no useful state (which is different
from empty -- but the timescale for changes from empty to
useless is normally too short for humans.

Deleting entries saves memory and speeds up lookups in the data
structures, but is extremely annoying if you want to collect per-flow
statistics.

If i remember well there is a knob to enable/disable removal of
useless pipes/queues but i am not sure if there is a sysctl or
timer or other mechanism to control it. If you have the time to
look at the source there might be some documentation.

cheers
luigi

 Sample results from 7.1 (currently inactive):
 00224:   2.000 Mbit/s9 ms  64 KB 1 queues (1 buckets) droptail
 mask: 0x00 0x/0x - 0x/0x
 BKT Prot ___Source IP/port Dest. IP/port Tot_pkt/bytes Pkt/Byte 
 Drp
   0 udp  192.168.224.183/0 192.168.216.179/0 5404902 598099622  0
 0   0
 
 Sample results from 8.2 (currently active simulator):
 00224:   2.000 Mbit/s   18 ms burst 0 
 q131296 64 KB 0 flows (1 buckets) sched 65760 weight 0 lmax 0 pri 0 droptail
  sched 65760 type FIFO flags 0x0 0 buckets 1 active
   0 ip   0.0.0.0/0 0.0.0.0/02 1785  00   0
 (and most of the time, the last line doesn't appear).
 
 I have checked a recent 9.0-BETA1 and it is still broken.  Looking at
 the dummynet.txt file, I cannot see this mentioned.  I have looked
 through the source and it does appear that scheduler instances are
 marked inactive in serve_sched() once they have no packets queued and
 are then garbage-collected via drain_scheduler_cb().  Is this the
 intent?  If so, how can statistics be collected?
 
 -- 
 Peter Jeremy


___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


Re: Statistics collection broken in new dummynet

2011-08-22 Thread Peter Jeremy
On 2011-Aug-23 04:20:43 +0200, Luigi Rizzo ri...@iet.unipi.it wrote:
Deleting entries saves memory and speeds up lookups in the data
structures, but is extremely annoying if you want to collect per-flow
statistics.

Which I do.

If i remember well there is a knob to enable/disable removal of
useless pipes/queues but i am not sure if there is a sysctl or
timer or other mechanism to control it.

Thanks - that was enough of a pointer to find
net.inet.ip.dummynet.expire

-- 
Peter Jeremy


pgpyI8uFcdMZc.pgp
Description: PGP signature


Re: problem with setting nat using pf

2011-08-22 Thread h bagade
 thanks for your reply. defining an alias on interfaces has its drawbacks.
Only natted addresses should be accessible via interface, not the remaining
addresses in pool which still no session is natted to them. Is there a way
to make pf do the task? or get helps of other utilities which accept the
responsibility of pool address arp requests?

On Sun, Aug 21, 2011 at 11:54 PM, David Cornejo d...@dogwood.com wrote:



 On Sat, Aug 20, 2011 at 9:47 PM, h bagade baga...@gmail.com wrote:

 Hi all,

 I am trying to use pf nat rules with pool support on FreeBsd 8.0, working
 together with ipfw as the main firewall. According to the natting concepts
 i
 faced in manuals and docs, nat concept is to map the source address to the
 natted address when sending the packets from that source and then map the
 destination address of the related reply packets.

 but when I define pf nat rules with a pool of IP addresses not available
 on
 the outside interface ip addresses, the outgoing traffic is natted to one
 of
 the pool addresses but the response is not received via that interface so
 the pf can map the destination address to the real one. here is one of my
 configs i used during my tests:

 *configurations:*
 *pf.conf:*
 nat on eth1 from { 11.11.11.0/24} to any -
 {172.16.10.1,172.16.10.2,172.

 16.10.3,172.16.10.4,172.16.10.5,172.16.10.6,172.16.10.7,172.16.10.8,172.16.10.9,172.16.10.10}

 main system configurations:
 eth0: 11.11.11.1
 eth1: 172.16.10.64

 system A: directly connected to eth0- 11.11.11.11
 system B: directly connected to eth1- 172.16.10.65

 in this configs the dafult route of system A and system B are the middle
 systems connected ip address.

 as mentioned, when systemA pings systemB, the ping requests are natted to
 172.16.10.1 and received at systemB but systemB doesn't send icmp replies
 because it doesn't know to whom it should send the replies (no answer to
 system B 's ARP requests about who has the natted IP).

 now my question is, isn't it the pf nat responsibilty to manage this
 condition and send the ARP replies to SystemB?
 or, are my configs wrong?
 or i misunderstood the nat concepts?

 any ideas or helps are really appreciated as i have to set this nat on my
 main system, asap.
 Thanks in advance.
 ___
 freebsd-net@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-net
 To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


 ARP is not handled by pf.  You need to get the interface to respond to that
 IP address by creating an alias for the address using ifconfig - if you need
 more help please post your rc.conf





___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org