@@ -13,13 +13,13 @@ swss::SubscriberStateTable ipHelpersTable(configDbPtr.get(), "DHCP_RELAY");
1313swss::Select swssSelect;
1414
1515/* *
16- * @code void deinitialize_swss ()
16+ * @code void initialize_swss ()
1717 *
1818 * @brief initialize DB tables and start SWSS listening thread
1919 *
2020 * @return none
2121 */
22- void initialize_swss (std::vector<relay_config> *vlans, swss::DBConnector *db )
22+ void initialize_swss (std::vector<relay_config> *vlans)
2323{
2424 try {
2525 swssSelect.addSelectable (&ipHelpersTable);
@@ -85,7 +85,7 @@ void handleSwssNotification(std::vector<relay_config> *vlans)
8585 * @brief handles DHCPv6 relay configuration change notification
8686 *
8787 * @param ipHelpersTable DHCP table
88- * @param context list of vlans/argument config that contains strings of server and option
88+ * @param vlans list of vlans/argument config that contains strings of server and option
8989 *
9090 * @return none
9191 */
@@ -103,7 +103,7 @@ void handleRelayNotification(swss::SubscriberStateTable &ipHelpersTable, std::ve
103103 * @brief process DHCPv6 relay servers and options configuration change notification
104104 *
105105 * @param entries queue of std::tuple<std::string, std::string, std::vector<FieldValueTuple>> entries in DHCP table
106- * @param context list of vlans/argument config that contains strings of server and option
106+ * @param vlans list of vlans/argument config that contains strings of server and option
107107 *
108108 * @return none
109109 */
@@ -117,6 +117,7 @@ void processRelayNotification(std::deque<swss::KeyOpFieldsValuesTuple> &entries,
117117 std::vector<swss::FieldValueTuple> fieldValues = kfvFieldsValues (entry);
118118
119119 relay_config intf;
120+ intf.is_option_79 = true ;
120121 intf.interface = vlan;
121122 for (auto &fieldValue: fieldValues) {
122123 std::string f = fvField (fieldValue);
@@ -130,11 +131,8 @@ void processRelayNotification(std::deque<swss::KeyOpFieldsValuesTuple> &entries,
130131 }
131132 syslog (LOG_DEBUG, " key: %s, Operation: %s, f: %s, v: %s" , vlan.c_str (), operation.c_str (), f.c_str (), v.c_str ());
132133 }
133- if (f == " dhcpv6_option|rfc6939_support" ) {
134- if (v == " true" )
135- intf.is_option_79 = true ;
136- else if (v == " false" )
137- intf.is_option_79 = false ;
134+ if (f == " dhcpv6_option|rfc6939_support" && v == " false" ) {
135+ intf.is_option_79 = false ;
138136 }
139137 }
140138 vlans->push_back (intf);
0 commit comments