Skip to content

Instantly share code, notes, and snippets.

@dlundquist
Last active March 23, 2016 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dlundquist/4691dfb16426e973a89b to your computer and use it in GitHub Desktop.
Save dlundquist/4691dfb16426e973a89b to your computer and use it in GitHub Desktop.
#!/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();
@dlundquist
Copy link
Author

This script can insert duplicate FDB entries under 3.13.0-23-generic.

@dlundquist
Copy link
Author

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