Bug 224555 - [ipfw] Command 'ipfw set move rule X to Y' not functioning
Summary: [ipfw] Command 'ipfw set move rule X to Y' not functioning
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.1-RELEASE
Hardware: Any Any
: --- Affects Many People
Assignee: Andrey V. Elsukov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-23 20:39 UTC by pru13allan
Modified: 2018-01-03 12:20 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pru13allan 2017-12-23 20:39:36 UTC
Firewall command 'ipfw set move rule X to Y' not functioning

No error from command but the set is not moved to set Y.

Steps to reproduce:

[root]# ipfw add 1500 set 1  allow tcp from me to any

[root]# ipfw -S list 1500
01500 set 1 allow tcp from me to any

[root]# ipfw set move rule 1500 to 2

[root]# ipfw -S list 1500
01500 set 1 allow tcp from me to any

The rule should now be in set 2 but it is still in set 1.

Tested on version:
FreeBSD fbsd3 11.1-RELEASE-p4 FreeBSD 11.1-RELEASE-p4 #0: Tue Nov 14 06:05:10
UTC 2017  root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386

FreeBSD HP2 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r326930: Tue Dec 19 10:36:45
CET 2017  root@HP2:/usr/obj/usr/src/i386.i386/sys/GENERIC-NODEBUG  i386

It is functioning in 10.3-RELEASE.
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-12-24 01:56:00 UTC
A commit references this bug:

Author: ae
Date: Sun Dec 24 01:55:12 UTC 2017
New revision: 327140
URL: https://svnweb.freebsd.org/changeset/base/327140

Log:
  Fix rule number truncation, use uint16_t type to specify rulenum.

  PR:		224555
  MFC after:	1 week

Changes:
  head/sbin/ipfw/ipfw2.c
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-01-03 12:19:55 UTC
A commit references this bug:

Author: ae
Date: Wed Jan  3 12:18:56 UTC 2018
New revision: 327518
URL: https://svnweb.freebsd.org/changeset/base/327518

Log:
  MFC r327140:
    Fix rule number truncation, use uint16_t type to specify rulenum.
    Also sort variable declartions by size.

    PR:		224555

Changes:
_U  stable/11/
  stable/11/sbin/ipfw/ipfw2.c
Comment 3 Andrey V. Elsukov freebsd_committer freebsd_triage 2018-01-03 12:20:43 UTC
Fixed in head/ and stable/11. Thanks!