File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -566,23 +566,29 @@ bool IntfMgr::setIntfProxyArp(const string &alias, const string &proxy_arp)
566
566
{
567
567
stringstream cmd;
568
568
string res;
569
- string proxy_arp_pvlan ;
569
+ string proxy_arp_status ;
570
570
571
571
if (proxy_arp == " enabled" )
572
572
{
573
- proxy_arp_pvlan = " 1" ;
573
+ proxy_arp_status = " 1" ;
574
574
}
575
575
else if (proxy_arp == " disabled" )
576
576
{
577
- proxy_arp_pvlan = " 0" ;
577
+ proxy_arp_status = " 0" ;
578
578
}
579
579
else
580
580
{
581
581
SWSS_LOG_ERROR (" Proxy ARP state is invalid: \" %s\" " , proxy_arp.c_str ());
582
582
return false ;
583
583
}
584
584
585
- cmd << ECHO_CMD << " " << proxy_arp_pvlan << " > /proc/sys/net/ipv4/conf/" << alias << " /proxy_arp_pvlan" ;
585
+ cmd << ECHO_CMD << " " << proxy_arp_status << " > /proc/sys/net/ipv4/conf/" << alias << " /proxy_arp_pvlan" ;
586
+ EXEC_WITH_ERROR_THROW (cmd.str (), res);
587
+
588
+ cmd.clear ();
589
+ cmd.str (std::string ());
590
+
591
+ cmd << ECHO_CMD << " " << proxy_arp_status << " > /proc/sys/net/ipv4/conf/" << alias << " /proxy_arp" ;
586
592
EXEC_WITH_ERROR_THROW (cmd.str (), res);
587
593
588
594
SWSS_LOG_INFO (" Proxy ARP set to \" %s\" on interface \" %s\" " , proxy_arp.c_str (), alias.c_str ());
You can’t perform that action at this time.
0 commit comments