]> git.proxmox.com Git - mirror_iproute2.git/commit
bridge: support for static fdb entries
authorRoopa Prabhu <roopa@cumulusnetworks.com>
Wed, 27 Jan 2016 17:09:37 +0000 (09:09 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Sun, 7 Feb 2016 19:41:09 +0000 (11:41 -0800)
commita1987cd17fcb042bd80f0dc2bf51941769fdb493
tree9b1b3498cfe5eb91493d06b2d5e16ed0fc0ba97f
parent5230a2ede099ed3141dc9495ee7b98c0b7ef2b10
bridge: support for static fdb entries

There is no intuitive option to add static fdb entries today.
'temp' seems to have a side effect of adding
'static' fdb entries. But the name and intent
of 'temp' does not say anything about it being static.

example:
bridge fdb add operates as follows:

$bridge fdb add 00:01:02:03:04:05 dev eth0 master
$bridge fdb add 00:01:02:03:04:06 dev eth0 master temp
$bridge fdb add 00:01:02:03:04:07 dev eth0 master local

$bridge fdb show
00:01:02:03:04:05 dev eth0 permanent
00:01:02:03:04:06 dev eth0 static
00:01:02:03:04:07 dev eth0 permanent
00:01:02:03:04:08 dev eth0 <<== dynamic, ageable learned mac

This patch adds a new bridge fdb type 'static' which
makes sure NUD_NOARP and NUD_REACHABLE is set for static
entries. This effectively is nothing but what 'temp'
does today. But the name 'temp' is misleading.

After the patch:
$bridge fdb add 00:01:02:03:04:06 dev eth0 master static

$bridge fdb show
00:01:02:03:04:06 dev eth0 static

'temp' could ideally be a dynamic mac that can age (ie just
NUD_REACHABLE). But, 'temp' sets 'NUD_NOARP' and 'NUD_REACHABLE'.
Too late to change 'temp' now. But, we are thinking of introduing a
'dynamic' keyword after this patch that only sets NUD_REACHABLE.

Signed-off-by: Wilson Kok <wkok@cumulusnetworks.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
bridge/fdb.c