Commit Graph

6 Commits

Author SHA1 Message Date
Ghanan Gowripalan 45fe9fe9c6 Clear IGMPv1 present flag on NIC down
This is dynamic state that can be re-learned when the NIC comes
back up.

Test: ipv4_test.TestIgmpV1Present
PiperOrigin-RevId: 354630921
2021-01-29 16:10:49 -08:00
Ghanan Gowripalan 53a95ad0df Use specified source address for IGMP/MLD packets
This change also considers interfaces and network endpoints enabled up
up to the point all work to disable them are complete. This was needed
so that protocols can perform shutdown work while being disabled (e.g.
sending a packet which requires the endpoint to be enabled to obtain a
source address).

Bug #4682, #4861
Fixes #4888

Startblock:
  has LGTM from peterjohnston
  and then
  add reviewer brunodalbo
PiperOrigin-RevId: 346869702
2020-12-10 14:50:20 -08:00
Bruno Dal Bo fd28ccfaa4 Introduce IPv4 options serializer and add RouterAlert to IGMP
PiperOrigin-RevId: 345701623
2020-12-04 10:10:56 -08:00
Ghanan Gowripalan bc81fcceda Support listener-side MLDv1
...as defined by RFC 2710. Querier (router)-side MLDv1 is not yet
supported.

The core state machine is shared with IGMPv2.

This is guarded behind a flag (ipv6.Options.MLDEnabled).

Tests: ip_test.TestMGP*

Bug #4861

PiperOrigin-RevId: 344344095
2020-11-25 18:00:41 -08:00
Ghanan Gowripalan ba2d5cb7e1 Use time.Duration for IGMP Max Response Time field
Bug #4682

PiperOrigin-RevId: 343993297
2020-11-23 22:47:55 -08:00
Ryan Heacock fbc4a8dbd1 Perform IGMPv2 when joining IPv4 multicast groups
Added headers, stats, checksum parsing capabilities from RFC 2236 describing
IGMPv2.

IGMPv2 state machine is implemented for each condition, sending and receiving
IGMP Membership Reports and Leave Group messages with backwards compatibility
with IGMPv1 routers.

Test:
* Implemented igmp header parser and checksum calculator in header/igmp_test.go
* ipv4/igmp_test.go tests incoming and outgoing IGMP messages and pathways.
* Added unit test coverage for IGMPv2 RFC behavior + IGMPv1 backwards
   compatibility in ipv4/igmp_test.go.

Fixes #4682

PiperOrigin-RevId: 343408809
2020-11-19 18:15:25 -08:00