[patch for review] Fwd: CURRENT: ifconfig tap0 results in core dump

From: Peter Edwards (peadar.edwards_at_gmail.com)
Date: 05/24/05

  • Next message: Maksim Yevmenkin: "Re: [patch for review] Fwd: CURRENT: ifconfig tap0 results in core dump"
    Date: Tue, 24 May 2005 16:38:02 +0100
    To: freebsd-net@freebsd.org
    
    
    

    Does anyone have any objection to me committing the patch in this thread?

    (Note: I inadvertently included a local change that no longer prevents
    non-root users from opening up /dev/tap*: I don't intend to commit
    that part of it)

    ---------- Forwarded message ----------
    From: Peter Edwards <peadar.edwards@gmail.com>
    Date: May 19, 2005 4:34 PM
    Subject: Re: CURRENT: ifconfig tap0 results in core dump
    To: Matti Saarinen <mjsaarin@cc.helsinki.fi>, Scot Hetzel
    <swhetzel@gmail.com>, freebsd-current@freebsd.org
    Cc: peadar@freebsd.org

    > > % ifconfig tap0
    > > tap0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
    > > inet6 fe80::2bd:9ff:fe7c:100%tap0 prefixlen 64 scopeid 0x5
    > > zsh: segmentation fault (core dumped) ifconfig tap0
    > >
    > >
    > > I remember that ifconfig didn't dump core when my laptop ran CURRENT
    > > from a few months ago.
    > >
    > You'll probably need to build a version of ifconfig with debugging
    > symbols. And then provide a backtrace of the core dump.
    >
    > How soon after killing openvpn, do you use the ifconfig command. It
    > might be possible that devfs was in the process of removing tap0, when
    > you used the ifconfig command.
    >
    Hm.
    It looks like the "close" code for if_tap clears out the addresses of
    the interface with a pretty blunt-edged "bzero", rather than removing
    them in any clean fashion. As a result, ifconfig gets confused over
    the address families in the tags it sees on the addresses it
    enumerates off the tap interface, and collapses with a corefile.

    if_tap's "close" seems to be trying to do part of what's done in
    if_detach, so I split out what I think are the relevant bits from
    there and used it in both places.

    Any networking experts care to take a look at the patch? I suspect
    there's a whole mess of locking I'm not doing for a start, but I think
    it might be an improvement over the current situation.

    Cheers,
    Peadar.

    
    
    

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



  • Next message: Maksim Yevmenkin: "Re: [patch for review] Fwd: CURRENT: ifconfig tap0 results in core dump"

    Relevant Pages

    • RE: ATHCTRL for ATH
      ... because now a days I donīt have atheros card, but I know how has between my ... Of course I appreciate your work in patch and time you have to spend on it, ... > roztyly# sysctl dev.ath.0.slottime=9 ... the attached patch and re-compile ifconfig. ...
      (freebsd-current)
    • Re: carpdev?
      ... I'm trying this patch against 7-stable amd64 from today. ... ifconfig carp0 carpdev em3 ... ifconfig: carpdev: bad value ...
      (freebsd-net)
    • Re: ifconfig patch
      ... I have been digging into why the edsc module wasnt being loaded by ... ifconfig and now have a patch. ... Its comparing using the string length of the module name so any partial ... Conceptually the patch seems right. ...
      (freebsd-net)
    • Re: ifconfig patch
      ... I have been digging into why the edsc module wasnt being loaded by ... ifconfig and now have a patch. ... Its comparing using the string length of the module name so any partial ... Conceptually the patch seems right. ...
      (freebsd-net)
    • patch to support setting carp state with ifconfig
      ... A few months ago I wrote a small patch that allows ifconfig to explicitly set a carp device to MASTER or BACKUP state. ... This is handy for situations where you want an active carp interface to fail over to/take over from the other host, perhaps for testing purposes or if you have a failed master you've brought back up that you want to take over again for a currently active slave host. ...
      (freebsd-net)