Bug 233072 - ipfw table 1 create type number: Table creation failed: Operation not supported
Summary: ipfw table 1 create type number: Table creation failed: Operation not supported
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.2-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Andrey V. Elsukov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-08 12:47 UTC by Eugene Grosbein
Modified: 2021-03-04 16:12 UTC (History)
4 users (show)

See Also:
eugen: mfc-stable12+
eugen: mfc-stable11+


Attachments
proposed patch (1.10 KB, patch)
2021-02-25 10:27 UTC, Andrey V. Elsukov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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