Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
21.7 Legacy Series
»
Can't Add Rules
« previous
next »
Print
Pages: [
1
]
Author
Topic: Can't Add Rules (Read 1739 times)
somnuk
Newbie
Posts: 3
Karma: 0
Can't Add Rules
«
on:
January 13, 2022, 06:45:08 am »
I can't add LAN filter rule by specifying host ip when click save it throws the php error messages as below:
PHP Errors:
===========
[13-Jan-2022 12:29:03 Asia/Bangkok] PHP Fatal error: Uncaught Error: Call to undefined function ip_range_to_subnet_array() in /usr/local/etc/inc/plugins.inc.d/if_pptp.inc:288
Stack trace:
#0 /usr/local/etc/inc/plugins.inc(190): if_pptp_interfaces()
#1 /usr/local/etc/inc/config.inc(156): plugins_interfaces()
#2 /usr/local/www/firewall_rules_edit.php(571): write_config()
#3 {main}
thrown in /usr/local/etc/inc/plugins.inc.d/if_pptp.inc on line 288
System Information:
==================
User-Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
FreeBSD 12.1-RELEASE-p21-HBSD #0 1c99b63a2ba(stable/21.7)-dirty: Wed Nov 10 11:17:14 CET 2021 root@sensey:/usr/obj/usr/src/amd64.amd64/sys/SMP amd64
OPNsense 21.7.7 3f5165238
Plugins os-dyndns-1.27_1 os-l2tp-1.9 os-openconnect-1.4.1 os-pptp-1.9
Time Thu, 13 Jan 2022 12:29:22 +0700
OpenSSL 1.1.1l 24 Aug 2021
PHP 7.4.26
dmesg.boot:
---<>---
Copyright (c) 2013-2019 The HardenedBSD Project.
Copyright (c) 1992-2019 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.1-RELEASE-p21-HBSD #0 1c99b63a2ba(stable/21.7)-dirty: Wed Nov 10 11:17:14 CET 2021
root@sensey:/usr/obj/usr/src/amd64.amd64/sys/SMP amd64
FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)
VT(efifb): resolution 1024x768
HardenedBSD: initialize and check features (__HardenedBSD_version 1200059 __FreeBSD_version 1201000).
CPU: Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz (3600.14-MHz K8-class CPU)
Origin="GenuineIntel" Id=0x906eb Family=0x6 Model=0x9e Stepping=11
Features=0xbfebfbff
Features2=0x7ffafbbf
AMD Features=0x2c100800
AMD Features2=0x121
Structured Extended Features=0x29c67af
Structured Extended Features3=0x9c000000
XSAVE Features=0xf
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
TSC: P-state invariant, performance statistics
real memory = 17179869184 (16384 MB)
avail memory = 16494866432 (15730 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table:
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s)
random: unblocking device.
ioapic0 irqs 0-119 on motherboard
Launching APs: 1 2 3
Timecounter "TSC-low" frequency 1800071397 Hz quality 1000
wlan: mac acl policy registered
random: entropy device external interface
kbd1 at kbdmux0
module_register_init: MOD_LOAD (vesa, 0xffffffff812947f0, 0) error 19
random: registering fast source Intel Secure Key RNG
random: fast provider: "Intel Secure Key RNG"
000.000054 [4344] netmap_init netmap: loaded module
[ath_hal] loaded
nexus0
efirtc0: on motherboard
efirtc0: registered as a time-of-day clock, resolution 1.000000s
cryptosoft0: on motherboard
acpi0: on motherboard
acpi0: Power Button (fixed)
cpu0: on acpi0
hpet0: iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 24000000 Hz quality 950
Event timer "HPET" frequency 24000000 Hz quality 550
Event timer "HPET1" frequency 24000000 Hz quality 440
Event timer "HPET2" frequency 24000000 Hz quality 440
Event timer "HPET3" frequency 24000000 Hz quality 440
Event timer "HPET4" frequency 24000000 Hz quality 440
atrtc0: port 0x70-0x77 irq 8 on acpi0
atrtc0: Warning: Couldn't map I/O.
atrtc0: registered as a time-of-day clock, resolution 1.000000s
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: port 0x40-0x43,0x50-0x53 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1808-0x180b on acpi0
pcib0: port 0xcf8-0xcff on acpi0
pci0: on pcib0
vgapci0: port 0xf000-0xf03f mem 0xf6000000-0xf6ffffff,0xe0000000-0xefffffff irq 16 at device 2.0 on pci0
vgapci0: Boot video device
xhci0: mem 0xf7630000-0xf763ffff irq 16 at device 20.0 on pci0
xhci0: 32 bytes context size, 64-bit DMA
usbus0: waiting for BIOS to give up control
xhci_interrupt: host controller halted
usbus0 on xhci0
usbus0: 5.0Gbps Super Speed USB v3.0
pci0: at device 22.0 (no driver attached)
ahci0: port 0xf090-0xf097,0xf080-0xf083,0xf060-0xf07f mem 0xf7648000-0xf7649fff,0xf764c000-0xf764c0ff,0xf764b000-0xf764b7ff irq 16 at device 23.0 on pci0
ahci0: AHCI v1.31 with 6 6Gbps ports, Port Multiplier not supported
ahcich0: at channel 0 on ahci0
ahcich1: at channel 1 on ahci0
ahcich2: at channel 2 on ahci0
ahcich3: at channel 3 on ahci0
ahcich4: at channel 4 on ahci0
ahcich5: at channel 5 on ahci0
ahciem0: at channel 2147483647 on ahci0
device_attach: ahciem0 attach returned 6
pcib1: irq 16 at device 27.0 on pci0
pci1: on pcib1
pcib2: irq 18 at device 27.2 on pci0
pci2: on pcib2
pcib3: irq 19 at device 27.3 on pci0
pci3: on pcib3
pcib4: irq 16 at device 27.4 on pci0
pci4: on pcib4
igb0: mem 0xf7500000-0xf757ffff,0xf758c000-0xf758ffff irq 16 at device 0.0 on pci4
igb0: Using 1024 TX descriptors and 1024 RX descriptors
igb0: Using 4 RX queues 4 TX queues
igb0: Using MSI-X interrupts with 5 vectors
igb0: Ethernet address: 00:1b:21:b1:ad:90
igb0: netmap queues/slots: TX 4/1024, RX 4/1024
igb1: mem 0xf7400000-0xf747ffff,0xf7588000-0xf758bfff irq 17 at device 0.1 on pci4
igb1: Using 1024 TX descriptors and 1024 RX descriptors
igb1: Using 4 RX queues 4 TX queues
igb1: Using MSI-X interrupts with 5 vectors
igb1: Ethernet address: 00:1b:21:b1:ad:91
igb1: netmap queues/slots: TX 4/1024, RX 4/1024
igb2: mem 0xf7380000-0xf73fffff,0xf7584000-0xf7587fff irq 18 at device 0.2 on pci4
igb2: Using 1024 TX descriptors and 1024 RX descriptors
igb2: Using 4 RX queues 4 TX queues
igb2: Using MSI-X interrupts with 5 vectors
igb2: Ethernet address: 00:1b:21:b1:ad:92
igb2: netmap queues/slots: TX 4/1024, RX 4/1024
igb3: mem 0xf7300000-0xf737ffff,0xf7580000-0xf7583fff irq 19 at device 0.3 on pci4
igb3: Using 1024 TX descriptors and 1024 RX descriptors
igb3: Using 4 RX queues 4 TX queues
igb3: Using MSI-X interrupts with 5 vectors
igb3: Ethernet address: 00:1b:21:b1:ad:93
igb3: netmap queues/slots: TX 4/1024, RX 4/1024
pcib5: irq 16 at device 28.0 on pci0
pci5: on pcib5
pcib6: irq 18 at device 28.2 on pci0
pci6: on pcib6
pcib7: irq 16 at device 28.4 on pci0
pci7: on pcib7
igb4: mem 0xf7200000-0xf727ffff,0xf728c000-0xf728ffff irq 16 at device 0.0 on pci7
igb4: Using 1024 TX descriptors and 1024 RX descriptors
igb4: Using 4 RX queues 4 TX queues
igb4: Using MSI-X interrupts with 5 vectors
igb4: Ethernet address: 00:1b:21:b0:bb:94
igb4: netmap queues/slots: TX 4/1024, RX 4/1024
igb5: mem 0xf7100000-0xf717ffff,0xf7288000-0xf728bfff irq 17 at device 0.1 on pci7
igb5: Using 1024 TX descriptors and 1024 RX descriptors
igb5: Using 4 RX queues 4 TX queues
igb5: Using MSI-X interrupts with 5 vectors
igb5: Ethernet address: 00:1b:21:b0:bb:95
igb5: netmap queues/slots: TX 4/1024, RX 4/1024
igb6: mem 0xf7080000-0xf70fffff,0xf7284000-0xf7287fff irq 18 at device 0.2 on pci7
igb6: Using 1024 TX descriptors and 1024 RX descriptors
igb6: Using 4 RX queues 4 TX queues
igb6: Using MSI-X interrupts with 5 vectors
igb6: Ethernet address: 00:1b:21:b0:bb:96
igb6: netmap queues/slots: TX 4/1024, RX 4/1024
igb7: mem 0xf7000000-0xf707ffff,0xf7280000-0xf7283fff irq 19 at device 0.3 on pci7
igb7: Using 1024 TX descriptors and 1024 RX descriptors
igb7: Using 4 RX queues 4 TX queues
igb7: Using MSI-X interrupts with 5 vectors
igb7: Ethernet address: 00:1b:21:b0:bb:97
igb7: netmap queues/slots: TX 4/1024, RX 4/1024
pcib8: irq 16 at device 29.0 on pci0
pci8: on pcib8
isab0: at device 31.0 on pci0
isa0: on isab0
pci0: at device 31.2 (no driver attached)
hdac0: mem 0xf7640000-0xf7643fff,0xf7620000-0xf762ffff irq 16 at device 31.3 on pci0
em0: mem 0xf7600000-0xf761ffff irq 16 at device 31.6 on pci0
em0: Using 1024 TX descriptors and 1024 RX descriptors
em0: Using an MSI interrupt
em0: Ethernet address: e0:d5:5e:a7:c7:d8
em0: netmap queues/slots: TX 1/1024, RX 1/1024
acpi_button0: on acpi0
acpi_button1: on acpi0
acpi_tz0: on acpi0
acpi_tz1: on acpi0
acpi_tz2: on acpi0
ppc1: port 0x378-0x37f irq 5 on acpi0
ppc1: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
ppbus0: on ppc1
lpt0: on ppbus0
lpt0: Interrupt-driven port
ppi0: on ppbus0
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
orm0: at iomem 0xc0000-0xcffff,0xd0000-0xd0fff,0xd1000-0xd1fff pnpid ORM0000 on isa0
atkbdc0: at port 0x60,0x64 on isa0
atkbd0: irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
est0: on cpu0
Timecounters tick every 1.000 msec
hdacc0: at cad 0 on hdac0
hdaa0: at nid 1 on hdacc0
pcm0: at nid 20,22,21,23 and 24,26 on hdaa0
pcm1: at nid 27 and 25 on hdaa0
pcm2: at nid 17 on hdaa0
hdacc1: at cad 2 on hdac0
hdaa1: at nid 1 on hdacc1
pcm3: at nid 3 on hdaa1
ugen0.1: <0x8086 XHCI root HUB> at usbus0
uhub0: <0x8086 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: ACS-4 ATA SATA 3.x device
ada0: Serial Number S3Y9NX0K823388X
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 512bytes)
ada0: Command Queueing enabled
ada0: 238475MB (488397168 512 byte sectors)
Trying to mount root from ufs:/dev/gpt/rootfs [rw]...
-----------------
How can I correct this problem?
Regards,
Somnuk
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Can't Add Rules
«
Reply #1 on:
January 13, 2022, 08:04:23 am »
os-pptp (and os-l2tp) have been removed since 20.7 and seems to rely on a function that was removed in 21.7.4.
You can revert to 21.7.3 for now if that even still works (sometimes dependencies are not backwards compatible):
# opnsense-revert -r 21.7.3 opnsense
Although it can be repaired by adding the missing functions to /usr/local/etc/inc/plugins.inc.d/if_pptp.inc I expect more breakage in future releases.
Cheers,
Franco
«
Last Edit: January 13, 2022, 08:07:10 am by franco
»
Logged
somnuk
Newbie
Posts: 3
Karma: 0
Re: Can't Add Rules
«
Reply #2 on:
January 13, 2022, 09:17:52 am »
Hi Franco,
How can obtain and add the function temporary?
Regards,
Somnuk
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Can't Add Rules
«
Reply #3 on:
January 13, 2022, 09:25:02 am »
https://github.com/opnsense/core/blob/543d4869c268c5629e38bea4a806440cde106cae/src/etc/inc/util.inc#L526-L586
into /usr/local/etc/inc/plugins.inc.d/if_pptp.inc
It might need more functions... ip_range_to_subnet_array() has been overengineered quite a bit.
Cheers,
Franco
Logged
somnuk
Newbie
Posts: 3
Karma: 0
Re: Can't Add Rules
«
Reply #4 on:
January 13, 2022, 10:40:10 am »
A lot of functions to put into.
ip_range_to_subnet_array()
ip_range_size()
ip_greater_than()
ip_less_than()
ip_before()
ip_after()
It works now.
Thks. Franco.
Regards,
Somnuk
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Can't Add Rules
«
Reply #5 on:
January 13, 2022, 10:42:22 am »
Ok, happy to hear it works
Cheers,
Franco
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
21.7 Legacy Series
»
Can't Add Rules