bool check_tnl_key; /* Verify the tunnel key of inbound packets? */
bool extended; /* Extended mode. */
bool demand; /* Demand mode. */
- bool booted; /* A full fault interval has occured. */
+ bool booted; /* A full fault interval has occurred. */
enum cfm_fault_reason fault; /* Connectivity fault status. */
- enum cfm_fault_reason recv_fault; /* Bit mask of faults occuring on
+ enum cfm_fault_reason recv_fault; /* Bit mask of faults occurring on
receive. */
bool opup; /* Operational State. */
bool remote_opup; /* Remote Operational State. */
return true;
}
+/* Must be called when the netdev owned by 'cfm' should change. */
+void
+cfm_set_netdev(struct cfm *cfm, const struct netdev *netdev)
+{
+ if (cfm->netdev != netdev) {
+ netdev_close(cfm->netdev);
+ cfm->netdev = netdev_ref(netdev);
+ }
+}
+
/* Returns true if 'cfm' should process packets from 'flow'. */
bool
cfm_should_process_flow(const struct cfm *cfm, const struct flow *flow)