+ bfd_set_state(bfd, bfd->state, DIAG_NONE);
+ need_poll = true;
+ }
+
+ hwaddr = smap_get(cfg, "bfd_dst_mac");
+ if (hwaddr && eth_addr_from_string(hwaddr, ea) && !eth_addr_is_zero(ea)) {
+ memcpy(bfd->eth_dst, ea, ETH_ADDR_LEN);
+ bfd->eth_dst_set = true;
+ } else if (bfd->eth_dst_set) {
+ memcpy(bfd->eth_dst, eth_addr_bfd, ETH_ADDR_LEN);
+ bfd->eth_dst_set = false;
+ }
+
+ ip_src = smap_get(cfg, "bfd_src_ip");
+ if (ip_src && bfd_lookup_ip(ip_src, &in_addr)) {
+ memcpy(&bfd->ip_src, &in_addr, sizeof in_addr);
+ } else {
+ bfd->ip_src = htonl(0xA9FE0100); /* 169.254.1.0. */
+ }
+
+ ip_dst = smap_get(cfg, "bfd_dst_ip");
+ if (ip_dst && bfd_lookup_ip(ip_dst, &in_addr)) {
+ memcpy(&bfd->ip_dst, &in_addr, sizeof in_addr);
+ } else {
+ bfd->ip_dst = htonl(0xA9FE0101); /* 169.254.1.1. */
+ }
+
+ forwarding_if_rx = smap_get_bool(cfg, "forwarding_if_rx", false);
+ if (bfd->forwarding_if_rx != forwarding_if_rx) {
+ bfd->forwarding_if_rx = forwarding_if_rx;
+ if (bfd->state == STATE_UP && bfd->forwarding_if_rx) {
+ bfd_forwarding_if_rx_update(bfd);
+ } else {
+ bfd->forwarding_if_rx_detect_time = 0;