feature: ipv4 broadcast support and bugfix for reset connection reset of IPv4+IPv6 stacks (#139)

* feature: ipv4 broadcast support

* stackip4 method receiver varname
This commit is contained in:
Pat Whittingslow
2026-06-24 16:54:41 -03:00
committed by GitHub
parent ef279863a9
commit a42f0b404c
4 changed files with 51 additions and 25 deletions
+3 -1
View File
@@ -103,6 +103,8 @@ type StackConfig struct {
MTU uint16
// Accept multicast ethernet and IP packets. Needed for MDNS.
AcceptMulticast bool
// Accept broadcast IPv4 packets. Needed for managing access points and DHCPv4 servers.
AcceptIPv4Broadcast bool
}
func (cfg *StackConfig) id() uint16 {
@@ -234,7 +236,7 @@ func (s *StackAsync) Reset(cfg StackConfig) (err error) {
}
s.ip4.SetAddr4(cfg.StaticAddress4)
s.setAcceptMulticast4(cfg.AcceptMulticast)
s.ip4.SetAcceptBroadcast4(cfg.AcceptIPv4Broadcast)
s.arpt.passivePeers = uint8(cfg.PassivePeers)
err = s.resetARP()
if err != nil {