Changeset View
Changeset View
Standalone View
Standalone View
sys/netgraph/ng_bridge.c
Show First 20 Lines • Show All 733 Lines • ▼ Show 20 Lines | if (ETHER_EQUAL(eh->ether_dhost, ng_bridge_bcast_addr)) { | ||||
counter_u64_add(ctx.incoming->stats.recvBroadcasts, 1); | counter_u64_add(ctx.incoming->stats.recvBroadcasts, 1); | ||||
ctx.manycast = 2; | ctx.manycast = 2; | ||||
} else | } else | ||||
counter_u64_add(ctx.incoming->stats.recvMulticasts, 1); | counter_u64_add(ctx.incoming->stats.recvMulticasts, 1); | ||||
} | } | ||||
/* Look up packet's source Ethernet address in hashtable */ | /* Look up packet's source Ethernet address in hashtable */ | ||||
if ((host = ng_bridge_get(priv, eh->ether_shost)) != NULL) { | if ((host = ng_bridge_get(priv, eh->ether_shost)) != NULL) { | ||||
/* Update time since last heard from this host */ | /* Update time since last heard from this host. | ||||
* This is safe without locking, because it's | |||||
* the only operation during shared access. | |||||
*/ | |||||
host->staleness = 0; | host->staleness = 0; | ||||
/* Did host jump to a different link? */ | /* Did host jump to a different link? */ | ||||
if (host->link != ctx.incoming) { | if (host->link != ctx.incoming) { | ||||
/* | /* | ||||
* If the host's old link was recently established | * If the host's old link was recently established | ||||
* on the old link and it's already jumped to a new | * on the old link and it's already jumped to a new | ||||
* link, declare a loopback condition. | * link, declare a loopback condition. | ||||
▲ Show 20 Lines • Show All 398 Lines • Show Last 20 Lines |