History

net: bridge: fix flags interpretation for extern learn fdb entries

Ignore fdb flags when adding port extern learn entries and always set BR_FDB_LOCAL flag when adding bridge extern learn entries. This is closest to the behaviour we had before and avoids breaking any use cases which were allowed. This patch fixes iproute2 calls which assume NUD_PERMANENT and were allowed before, example: $ bridge fdb add 00:11:22:33:44:55 dev swp1 extern_learn Extern learn entries are allowed to roam, but do not expire, so static or dynamic flags make no sense for them. Also add a comment for future reference.

Nikolay Aleksandrov committed 5 years ago

Commit 45a68781 parent 2e273b04 files · +11 −12Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/neighbour.h+5−2
@@ -66,8 +66,11 @@ enum { · 65 unmodified lines
66#define NUD_NONE 0x0066#define NUD_NONE 0x00
67 67
68/* NUD_NOARP & NUD_PERMANENT are pseudostates, they never change68/* NUD_NOARP & NUD_PERMANENT are pseudostates, they never change
69 and make no address resolution or NUD.69 * and make no address resolution or NUD.
70 NUD_PERMANENT also cannot be deleted by garbage collectors.70 * NUD_PERMANENT also cannot be deleted by garbage collectors.
71 * When NTF_EXT_LEARNED is set for a bridge fdb entry the different cache entry
72 * states don't make sense and thus are ignored. Such entries don't age and
73 * can roam.
71 */74 */
72 75
73struct nda_cacheinfo {76struct nda_cacheinfo {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t