@@ -2382,25 +2382,25 @@ func (c LegacyClient) CreateSgBaseEgressACL(sgName string) error {
2382
2382
klog .Infof ("add base egress acl, sg: %s" , portGroupName )
2383
2383
// allow arp
2384
2384
if _ , err := c .ovnNbCommand (MayExist , "--type=port-group" , "acl-add" , portGroupName , string (SgAclEgressDirection ), util .SecurityGroupBasePriority ,
2385
- fmt .Sprintf ("outport ==@%s && arp" , portGroupName ), "allow-related" ); err != nil {
2385
+ fmt .Sprintf ("inport ==@%s && arp" , portGroupName ), "allow-related" ); err != nil {
2386
2386
return err
2387
2387
}
2388
2388
2389
2389
// icmpv6
2390
2390
if _ , err := c .ovnNbCommand (MayExist , "--type=port-group" , "acl-add" , portGroupName , string (SgAclEgressDirection ), util .SecurityGroupBasePriority ,
2391
- fmt .Sprintf ("outport ==@%s && icmp6.type=={130, 133, 135, 136} && icmp6.code == 0 && ip.ttl == 255" , portGroupName ), "allow-related" ); err != nil {
2391
+ fmt .Sprintf ("inport ==@%s && icmp6.type=={130, 133, 135, 136} && icmp6.code == 0 && ip.ttl == 255" , portGroupName ), "allow-related" ); err != nil {
2392
2392
return err
2393
2393
}
2394
2394
2395
2395
// dhcpv4 res
2396
2396
if _ , err := c .ovnNbCommand (MayExist , "--type=port-group" , "acl-add" , portGroupName , string (SgAclEgressDirection ), util .SecurityGroupBasePriority ,
2397
- fmt .Sprintf ("outport ==@%s && udp.src==68 && udp.dst==67 && ip4" , portGroupName ), "allow-related" ); err != nil {
2397
+ fmt .Sprintf ("inport ==@%s && udp.src==68 && udp.dst==67 && ip4" , portGroupName ), "allow-related" ); err != nil {
2398
2398
return err
2399
2399
}
2400
2400
2401
2401
// dhcpv6 res
2402
2402
if _ , err := c .ovnNbCommand (MayExist , "--type=port-group" , "acl-add" , portGroupName , string (SgAclEgressDirection ), util .SecurityGroupBasePriority ,
2403
- fmt .Sprintf ("outport ==@%s && udp.src==546 && udp.dst==547 && ip6" , portGroupName ), "allow-related" ); err != nil {
2403
+ fmt .Sprintf ("inport ==@%s && udp.src==546 && udp.dst==547 && ip6" , portGroupName ), "allow-related" ); err != nil {
2404
2404
return err
2405
2405
}
2406
2406
return nil
@@ -2411,25 +2411,25 @@ func (c LegacyClient) CreateSgBaseIngressACL(sgName string) error {
2411
2411
klog .Infof ("add base ingress acl, sg: %s" , portGroupName )
2412
2412
// allow arp
2413
2413
if _ , err := c .ovnNbCommand (MayExist , "--type=port-group" , "acl-add" , portGroupName , string (SgAclIngressDirection ), util .SecurityGroupBasePriority ,
2414
- fmt .Sprintf ("inport ==@%s && arp" , portGroupName ), "allow-related" ); err != nil {
2414
+ fmt .Sprintf ("outport ==@%s && arp" , portGroupName ), "allow-related" ); err != nil {
2415
2415
return err
2416
2416
}
2417
2417
2418
2418
// icmpv6
2419
2419
if _ , err := c .ovnNbCommand (MayExist , "--type=port-group" , "acl-add" , portGroupName , string (SgAclIngressDirection ), util .SecurityGroupBasePriority ,
2420
- fmt .Sprintf ("inport ==@%s && icmp6.type=={130, 134, 135, 136} && icmp6.code == 0 && ip.ttl == 255" , portGroupName ), "allow-related" ); err != nil {
2420
+ fmt .Sprintf ("outport ==@%s && icmp6.type=={130, 134, 135, 136} && icmp6.code == 0 && ip.ttl == 255" , portGroupName ), "allow-related" ); err != nil {
2421
2421
return err
2422
2422
}
2423
2423
2424
2424
// dhcpv4 offer
2425
2425
if _ , err := c .ovnNbCommand (MayExist , "--type=port-group" , "acl-add" , portGroupName , string (SgAclIngressDirection ), util .SecurityGroupBasePriority ,
2426
- fmt .Sprintf ("inport ==@%s && udp.src==67 && udp.dst==68 && ip4" , portGroupName ), "allow-related" ); err != nil {
2426
+ fmt .Sprintf ("outport ==@%s && udp.src==67 && udp.dst==68 && ip4" , portGroupName ), "allow-related" ); err != nil {
2427
2427
return err
2428
2428
}
2429
2429
2430
2430
// dhcpv6 offer
2431
2431
if _ , err := c .ovnNbCommand (MayExist , "--type=port-group" , "acl-add" , portGroupName , string (SgAclIngressDirection ), util .SecurityGroupBasePriority ,
2432
- fmt .Sprintf ("inport ==@%s && udp.src==547 && udp.dst==546 && ip6" , portGroupName ), "allow-related" ); err != nil {
2432
+ fmt .Sprintf ("outport ==@%s && udp.src==547 && udp.dst==546 && ip6" , portGroupName ), "allow-related" ); err != nil {
2433
2433
return err
2434
2434
}
2435
2435
0 commit comments