git: kernel - Fix another netinet6 panic, change how ipv6 proxying works

Matthew Dillon dillon at crater.dragonflybsd.org
Thu May 1 22:27:41 PDT 2025


commit f3b7d8e6340f6ac324332b9b25f5a30bd846a965
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu May 1 22:20:54 2025 -0700

    kernel - Fix another netinet6 panic, change how ipv6 proxying works
    
    ipv6 isn't naturally proxying subnets on other interface (not responding
    to neighbor solicitations) when forwarding is turned on.
    
    However, there are numerous other issues involved here so for now I
    am pushing a hack so at least we are backwards-compatible.
    
    * Add a new interface flag, IFF_ANNOUNCE, named "proxy" in ifconfig.
      Add "proxy" and "-proxy" options to ifconfig.
    
    * Most non-localhost interfaces will set this bit by default.  The bit
      can be turned off in ifconfig using -proxy when configuring the interface.
    
    * Adjust nd6_nbr.c (neighbor solicitation code) to respond to
      solicitations if (A) the route has RTF_ANNOUNCE set, or (B)
      the interface the route is associated with (note: its parent bridge
      if the interface is on a bridge) has the IFF_ANNOUNCE bit set.
    
      This makes ipv6 forwarding work naturally again.
    
    * Also fix a bug where an ipv6 state assertion sometimes triggers.
      Do not assert, and instead report the problem.  This seems to occur
      because the state machine sometimes does not initialize the llinfo
      (the MAC) in the cache entry but still sets the state to a value
      beyond ND6_LLINFO_INCOMPLETE.
    
    This fix is temporary until we can figure out a better way to deal with
    DAD issues.

Summary of changes:
 sbin/ifconfig/ifconfig.c |  5 ++++-
 sys/net/if.c             |  8 ++++++++
 sys/net/if.h             |  1 +
 sys/netinet6/nd6.c       | 14 +++++++++++---
 sys/netinet6/nd6_nbr.c   | 27 ++++++++++++++++++++++++++-
 5 files changed, 50 insertions(+), 5 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f3b7d8e6340f6ac324332b9b25f5a30bd846a965


-- 
DragonFly BSD source repository


More information about the Commits mailing list