Bug 233072

Summary: ipfw table 1 create type number: Table creation failed: Operation not supported
Product: Base System Reporter: Eugene Grosbein <eugen>
Component: kernAssignee: Andrey V. Elsukov <ae>
Status: Closed FIXED    
Severity: Affects Some People CC: ae, cayen14422, net, ozkan.kirik
Priority: --- Flags: eugen: mfc-stable12+
eugen: mfc-stable11+
Version: 11.2-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
proposed patch none

Description Eugene Grosbein freebsd_committer freebsd_triage 2018-11-08 12:47:01 UTC
The following command fails:

# ipfw table 1 create type number
ipfw: Table creation failed: Operation not supported

The following one works:

# ipfw table 1 create type number algo number:array

Please fix algo defaults to be sane and depend of table type.
Comment 1 Eugene Grosbein freebsd_committer freebsd_triage 2018-11-10 14:48:11 UTC
Fix Assignee to rightful author of the code in question.
Comment 2 Ozkan KIRIK 2021-01-08 08:27:55 UTC
Problem still occurs
Comment 3 Andrey V. Elsukov freebsd_committer freebsd_triage 2021-02-25 10:27:54 UTC
Created attachment 222815 [details]
proposed patch

Can you test this patch?
Comment 4 Eugene Grosbein freebsd_committer freebsd_triage 2021-02-25 13:40:47 UTC
(In reply to Andrey V. Elsukov from comment #3)

I've just tested it with my 11.4-STABLE/amd64 workstation. The patch works just fine, please commit.
Comment 5 commit-hook freebsd_committer freebsd_triage 2021-02-25 14:06:45 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=13ad237a19b7368124483d9d1dc3258c27880fef

commit 13ad237a19b7368124483d9d1dc3258c27880fef
Author:     Andrey V. Elsukov <ae@FreeBSD.org>
AuthorDate: 2021-02-25 13:57:47 +0000
Commit:     Andrey V. Elsukov <ae@FreeBSD.org>
CommitDate: 2021-02-25 13:57:47 +0000

    ipfw: make algo name argument optional for some table types

    Most of table types currently supported by ipfw have only one
    algorithm implementation. When user creates such tables, allow
    to omit algo name in arguments. E.g. now it is possible:
            ipfw table T1 create type number
            ipfw table T2 create type iface
            ipfw table T3 create type flow

    PR:             233072
    MFC after:      1 week
    Sponsored by:   Yandex LLC

 sbin/ipfw/tables.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-03-04 09:20:58 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=8d0f1438b0d73dfa880cfafc5d09beb4e7100a3f

commit 8d0f1438b0d73dfa880cfafc5d09beb4e7100a3f
Author:     Andrey V. Elsukov <ae@FreeBSD.org>
AuthorDate: 2021-02-25 13:57:47 +0000
Commit:     Andrey V. Elsukov <ae@FreeBSD.org>
CommitDate: 2021-03-04 09:19:31 +0000

    ipfw: make algo name argument optional for some table types

    Most of table types currently supported by ipfw have only one
    algorithm implementation. When user creates such tables, allow
    to omit algo name in arguments. E.g. now it is possible:
            ipfw table T1 create type number
            ipfw table T2 create type iface
            ipfw table T3 create type flow

    PR:             233072
    Sponsored by:   Yandex LLC

    (cherry picked from commit 13ad237a19b7368124483d9d1dc3258c27880fef)

 sbin/ipfw/tables.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
Comment 7 commit-hook freebsd_committer freebsd_triage 2021-03-04 09:22:59 UTC
A commit in branch stable/12 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=f8317f3a4c7dc01438328edd21c984d794286ec5

commit f8317f3a4c7dc01438328edd21c984d794286ec5
Author:     Andrey V. Elsukov <ae@FreeBSD.org>
AuthorDate: 2021-02-25 13:57:47 +0000
Commit:     Andrey V. Elsukov <ae@FreeBSD.org>
CommitDate: 2021-03-04 09:21:28 +0000

    ipfw: make algo name argument optional for some table types

    Most of table types currently supported by ipfw have only one
    algorithm implementation. When user creates such tables, allow
    to omit algo name in arguments. E.g. now it is possible:
            ipfw table T1 create type number
            ipfw table T2 create type iface
            ipfw table T3 create type flow

    PR:             233072
    Sponsored by:   Yandex LLC

    (cherry picked from commit 13ad237a19b7368124483d9d1dc3258c27880fef)

 sbin/ipfw/tables.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
Comment 8 commit-hook freebsd_committer freebsd_triage 2021-03-04 09:25:01 UTC
A commit in branch stable/11 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=952ad28223596ef4e323a9a7da81ef3faf1c919a

commit 952ad28223596ef4e323a9a7da81ef3faf1c919a
Author:     Andrey V. Elsukov <ae@FreeBSD.org>
AuthorDate: 2021-02-25 13:57:47 +0000
Commit:     Andrey V. Elsukov <ae@FreeBSD.org>
CommitDate: 2021-03-04 09:23:01 +0000

    ipfw: make algo name argument optional for some table types

    Most of table types currently supported by ipfw have only one
    algorithm implementation. When user creates such tables, allow
    to omit algo name in arguments. E.g. now it is possible:
            ipfw table T1 create type number
            ipfw table T2 create type iface
            ipfw table T3 create type flow

    PR:             233072
    Sponsored by:   Yandex LLC

    (cherry picked from commit 13ad237a19b7368124483d9d1dc3258c27880fef)

 sbin/ipfw/tables.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
Comment 9 Andrey V. Elsukov freebsd_committer freebsd_triage 2021-03-04 09:25:14 UTC
Fixed in head, stable/13, stable/12 and stable/11. Thanks!
Comment 10 cayen14422 2021-03-04 16:12:17 UTC
MARKED AS SPAM