Skip to content

Commit

Permalink
wip - 2
Browse files Browse the repository at this point in the history
Signed-off-by: zhangzujian <[email protected]>
  • Loading branch information
zhangzujian committed Nov 4, 2024
1 parent 8c8f1ab commit 89cd95f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions controller/pinctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3339,6 +3339,19 @@ process_packet_in(struct rconn *swconn, const struct ofp_header *msg)
break;

default:
ovs_mutex_lock(&pinctrl_mutex);
bool is_bfd_msg = (ip_flow->dl_type == htons(ETH_TYPE_IP) ||
ip_flow->dl_type == htons(ETH_TYPE_IPV6)) &&
ip_flow->nw_proto == IPPROTO_UDP;
if (is_bfd_msg) {
struct udp_header *udp_hdr = dp_packet_l4(pkt_in);
is_bfd_msg = udp_hdr->udp_dst == htons(BFD_DEST_PORT);
}
if (is_bfd_msg) {
pinctrl_handle_bfd_msg(swconn, &headers, &packet);
}
ovs_mutex_unlock(&pinctrl_mutex);

VLOG_WARN_RL(&rl, "unrecognized packet-in opcode %"PRIu32,
ntohl(ah->opcode));
break;
Expand Down

0 comments on commit 89cd95f

Please sign in to comment.