cvs commit: src/sys/net if.c if_var.h src/sys/net/tap if_tap.c src/sys/net/tun if_tun.c if_tunvar.h

Sepherosa Ziehau sephe at
Sun Dec 30 21:00:02 PST 2007

sephe       2007/12/30 20:58:54 PST

DragonFly src repository

  Modified files:
    sys/net              if.c if_var.h 
    sys/net/tap          if_tap.c 
    sys/net/tun          if_tun.c if_tunvar.h 
  - Factor out if_purgeaddrs_nolink(), which frees all non-link ifaddrs no
  - Use above function in if_detach() and free link ifaddr manually, add some
    assertion there to make sure ifnet.if_addrhead is in sane state
  Submitted-by: pavalos@
  Obtained-from: FreeBSD (w/ modification)
  For tap(4)
  - Use if_purgeaddrs_nolink() to clean up tap's if_addrhead
  - Cleaning up ifaddrs has nothing to do with current tap's mode (vmnet/tap)
  - In non-vmnet mode, clear IFF_RUNNING if_flags when a tap is brought down
  For tun(4)
  - Use if_purgeaddrs_nolink() to clean up tun's if_addrhead
  - Cleaning up ifaddrs has nothing to do with IFF_RUNNING
  - in_control() is clever enough to set the RTF_HOST flags for tun, so tun
    does not need to record that dst addr has been set.  Since net/tun/if_tunvar.h
    was exposed to /usr/include "accidentally", instead of nuking TUN_DSTADDR,
    I just mark it as "unused" in comment.
  Revision  Changes    Path
  1.59      +47 -23    src/sys/net/if.c
  1.43      +1 -0      src/sys/net/if_var.h
  1.38      +15 -28    src/sys/net/tap/if_tap.c
  1.32      +2 -19     src/sys/net/tun/if_tun.c
  1.3       +2 -2      src/sys/net/tun/if_tunvar.h

More information about the Commits mailing list