ebtables-restore error "Bad table name 'filter'"

Bug #1672276 reported by Alex Topchiy on 2017-03-13
42
This bug affects 7 people
Affects Status Importance Assigned to Milestone
ebtables (Ubuntu)
High
Unassigned
Xenial
Undecided
Unassigned
Yakkety
Undecided
Unassigned
Zesty
Undecided
Unassigned

Bug Description

ubuntu server 16.04.1 ethernet bridge + ebtables

Standard use.
ebtables-save > txt1.txt

I get this file.

# Generated by ebtables-save v1.0 on Fri Mar 10 16:11:58 MSK 2017
*filter
:INPUT ACCEPT
:FORWARD ACCEPT
:OUTPUT ACCEPT
-A FORWARD -p IPv4 -o enp0s9 --ip-dst 192.168.1.41 --ip-proto tcp -j DROP

I do not modify this file.

I drop the chains.
ebtables -F

I try to restore a configuration from a file I receive an error.
ebtables-restore < txt1.txt
Bad table name 'filter'.

It seems that ebtables-restore does not support the files that ebtables-save generates.

madbiologist (me-again) on 2017-03-13
tags: added: xenial
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ebtables (Ubuntu):
status: New → Confirmed
Joshua Powers (powersj) wrote :

This appears to exist on Xenial, Yakkety, and Zesty. Brought up a quick LXD using the ubuntu-daily images and reproduced it in each.

tags: added: yakkety zesty
ktf (mvanb1) wrote :

Is there a workaround or a way to make a file that ebtables-restore does accept, by hand for example?

Changed in ebtables (Ubuntu):
importance: Undecided → High
Joshua Powers (powersj) wrote :

@ktf the only other report of this I could find was someone doing the restore manually here:
http://knoffhoff.tumblr.com/post/59967875099/how-to-save-and-load-ebtables-rules

Use at your own risk as I have yet to test that.

Nish Aravamudan (nacc) wrote :

# ebtables-restore < txt1.txt
Bad table name 'filter'.
# ebtables -t filter -L
Bridge table: filter

Bridge chain: INPUT, entries: 0, policy: ACCEPT

Bridge chain: FORWARD, entries: 0, policy: ACCEPT

Bridge chain: OUTPUT, entries: 0, policy: ACCEPT

So i think this is a bug, probably upstream?

Heh, looks like upstream recently deleted this file: https://git.netfilter.org/ebtables/commit/?id=826faffa38de8ce55bb32cd1549fb732229fd80f but I think it's unrelated. In any case, we should probably try to build from source on a victim LXD and debug it a bit further.

Changed in ebtables (Ubuntu):
status: Confirmed → Triaged
Joshua Powers (powersj) on 2017-04-26
tags: added: needs-upstream-report
Immo (iwetzel) wrote :

any news on this

@Nish / @Josh - you worked on this before, was there any upstream report already that might be missing or is this waiting for someone to actually report it first (also pinging on IRC about it)?

Joshua Powers (powersj) wrote :

I don't believe there was an upstream report, however it looks like ebtables-restore was removed from the upstream repo here:

https://git.netfilter.org/ebtables/commit/?id=826faffa38de8ce55bb32cd1549fb732229fd80f

Andreas Hasenack (ahasenack) wrote :

Some sort of initialization is missing:

96 struct ebt_u_table *ebt_find_table(const char *name)
97 {
98 struct ebt_u_table *t = ebt_tables;
99
100 while (t && strcmp(t->name, name)) {
101 printf("t->name: %s name: %s", t->name, name);
(gdb) n
98 struct ebt_u_table *t = ebt_tables;
(gdb) n
100 while (t && strcmp(t->name, name)) {
(gdb) p t
$1 = (struct ebt_u_table *) 0x0
(gdb) p name
$2 = 0x602100 <replace> "filter"
(gdb) p ebt_tables
$3 = (struct ebt_u_table *) 0x0

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ebtables (Ubuntu Xenial):
status: New → Confirmed
Changed in ebtables (Ubuntu Yakkety):
status: New → Confirmed
Changed in ebtables (Ubuntu Zesty):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers