Skip to content

Commit

Permalink
Tweaks to ip filtering (#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanG100 authored Oct 18, 2024
1 parent a1f312f commit 9a31d1d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dataplane/saiserver/switch.go
Original file line number Diff line number Diff line change
Expand Up @@ -854,13 +854,13 @@ func (sw *saiSwitch) CreateSwitch(ctx context.Context, _ *saipb.CreateSwitchRequ
// https://www.rfc-editor.org/rfc/rfc1812#section-5.3.7
func (sw *saiSwitch) createInvalidPacketFilter(ctx context.Context) error {
ips := map[string]map[fwdpb.PacketFieldNum][]string{
invalidIngressV4Table: {
fwdpb.PacketFieldNum_PACKET_FIELD_NUM_IP_ADDR_SRC: {"127.0.0.0/8"},
fwdpb.PacketFieldNum_PACKET_FIELD_NUM_IP_ADDR_DST: {"224.0.0.0/4", "127.0.0.0/8", "255.255.255.255/24"},
invalidIngressV4Table: { /* LOOPBACK BROADCAST MULTICAST */
fwdpb.PacketFieldNum_PACKET_FIELD_NUM_IP_ADDR_SRC: {"127.0.0.0/8", "255.255.255.255/32", "224.0.0.0/4"},
fwdpb.PacketFieldNum_PACKET_FIELD_NUM_IP_ADDR_DST: {"127.0.0.0/8", "255.255.255.255/32"},
},
invalidIngressV6Table: {
fwdpb.PacketFieldNum_PACKET_FIELD_NUM_IP_ADDR_SRC: {"ff00::/8"},
fwdpb.PacketFieldNum_PACKET_FIELD_NUM_IP_ADDR_DST: {"ff00::/8", "fe80::/10"},
invalidIngressV6Table: { /* LOOPBACK MULTICAST*/
fwdpb.PacketFieldNum_PACKET_FIELD_NUM_IP_ADDR_SRC: {"::1/128", "ff00::/8"},
fwdpb.PacketFieldNum_PACKET_FIELD_NUM_IP_ADDR_DST: {"::1/128"},
},
}
// Packets can't have multicast, or loopback IP as the source IP.
Expand Down

0 comments on commit 9a31d1d

Please sign in to comment.