Skip to content
4 changes: 2 additions & 2 deletions orchagent/swssnet.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ inline static sai_ip_prefix_t& subnet(sai_ip_prefix_t& dst, const sai_ip_prefix_
{
case SAI_IP_ADDR_FAMILY_IPV4:
dst.addr.ip4 = src.addr.ip4 & src.mask.ip4;
dst.mask.ip4 = 0xFFFFFFFF;
dst.mask.ip4 = src.mask.ip4;
break;
case SAI_IP_ADDR_FAMILY_IPV6:
for (size_t i = 0; i < 16; i++)
{
dst.addr.ip6[i] = src.addr.ip6[i] & src.mask.ip6[i];
dst.mask.ip6[i] = 0xFF;
dst.mask.ip6[i] = src.mask.ip6[i];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the dst mask then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved. Sorry for the mistake.

}
break;
default:
Expand Down