Last active
March 23, 2016 16:42
-
-
Save dlundquist/4691dfb16426e973a89b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
sub append_fdb_entries { | |
my $vtep = shift; | |
for (;;) { | |
my $pid = fork(); | |
if (not defined $pid) { | |
die("fork: $!"); | |
} elsif ($pid == 0) { | |
my $ip = "192.0.2." . (100 + int(rand(100))); | |
exec('/sbin/bridge', 'fdb', 'append', '00:00:00:00:00:00', | |
'dev', $vtep, 'dst', $ip); | |
die("exec: $!"); | |
} | |
waitpid($pid, 0); | |
} | |
} | |
sub main { | |
my $vtep = 'vxlan-1'; | |
system('ip', 'link', 'add', $vtep, 'type', 'vxlan', | |
'id', '1', 'dev', 'eth0'); | |
for (my $i = 0; $i < 16; $i++) { | |
my $pid = fork(); | |
if (not defined $pid) { | |
die("fork: $!"); | |
} elsif ($pid == 0) { | |
# Child | |
append_fdb_entries($vtep); | |
exit(0); | |
} | |
} | |
for (;;) { | |
sleep(1); | |
} | |
} | |
main(); |
Verified issue still occurs on 3.13.0-83-generic
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script can insert duplicate FDB entries under 3.13.0-23-generic.