[Bug 206658] Bus error for pfctl -sa on rpi2 r294499 snap
Jov
amutu at amutu.com
Wed Jan 27 03:29:19 UTC 2016
I am downloading the src and try to test the patch.
How can I only compile the pfctl? I do not want to compile the whole world
and kernel because the SD card is too slow.
Jov
blog: http:amutu.com/blog <http://amutu.com/blog>
2016-01-27 10:48 GMT+08:00 Ian Lepore <ian at freebsd.org>:
> On Wed, 2016-01-27 at 02:24 +0000, bugzilla-noreply at freebsd.org wrote:
> > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206658
> >
> > Bug ID: 206658
> > Summary: Bus error for pfctl -sa on rpi2 r294499 snap
> > Product: Base System
> > Version: 11.0-CURRENT
> > Hardware: arm
> > OS: Any
> > Status: New
> > Severity: Affects Only Me
> > Priority: ---
> > Component: arm
> > Assignee: freebsd-arm at FreeBSD.org
> > Reporter: amutu at amutu.com
> >
> > uname -a:
> > FreeBSD p2 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r294499: Fri Jan 22
> > 01:49:44
> > UTC 2016 root at releng2.nyi.freebsd.org:/usr/obj/arm.armv6/usr/src/
> > sys/RPI2
> > arm
> >
> > gdb:
> > ....
> > pass in log quick on wlan0 inet proto tcp from any to (wlan0) port =
> > 3333 flags
> > S/SA keep state (source-track rule, max-src-conn 5, max-src-conn-rate
> > 3/30,
> > overload <bruteforce> flush global, src.track 30)
> > pass in log quick on wlan0 inet proto tcp from any to (wlan0) port =
> > 3333 flags
> > S/SA keep state (source-track rule, max-src-conn 5, max-src-conn-rate
> > 3/30,
> > overload <bruteforce> flush global, src.track 30)
> >
> > STATES:
> > all tcp 192.168.1.114:48865 -> 103.138.240.229:37005
> > TIME_WAIT:TIME_WAIT
> >
> > Program received signal SIGBUS, Bus error.
> > 0x00021614 in print_host (addr=0x2065113e, port=45235, af=2 '\002',
> > opts=1024)
> > at /usr/src/sbin/pfctl/pf_print_state.c:178
> > 178 /usr/src/sbin/pfctl/pf_print_state.c: No such file or
> > directory.
> > in /usr/src/sbin/pfctl/pf_print_state.c
> > Current language: auto; currently minimal
> > (gdb) bt
> > #0 0x00021614 in print_host (addr=0x2065113e, port=45235, af=2
> > '\002',
> > opts=1024) at /usr/src/sbin/pfctl/pf_print_state.c:178
> > #1 0x0002189c in print_state (s=0x206510f2, opts=1024) at
> > /usr/src/sbin/pfctl/pf_print_state.c:236
> > #2 0x0000c35c in pfctl_show_states (dev=<value optimized out>,
> > iface=0x0,
> > opts=<value optimized out>)
> > at /usr/src/sbin/pfctl/pfctl.c:1091
> > #3 0x0000f018 in $a.107 () at /usr/src/sbin/pfctl/pfctl.c:2241
> > #4 0x0000f018 in $a.107 () at /usr/src/sbin/pfctl/pfctl.c:2241
> >
>
> I attached a patch to the PR and requested the reporter test it, but
> I've just realized that the problem was found with a snapshot image and
> the reporter may not be able to patch and build.
>
> I don't use the pf stuff myself, so I have no way of testing it. Can
> someone who does use it give this patch a test? Thanks.
>
> -- Ian
>
> Index: sbin/pfctl/pf_print_state.c
> ===================================================================
> --- sbin/pfctl/pf_print_state.c (revision 294860)
> +++ sbin/pfctl/pf_print_state.c (working copy)
> @@ -146,7 +146,7 @@ print_name(struct pf_addr *addr, sa_family_t af)
> memset(&sin, 0, sizeof(sin));
> sin.sin_len = sizeof(sin);
> sin.sin_family = AF_INET;
> - sin.sin_addr = addr->v4;
> + memcpy(&sin.sin_addr, addr->v4, sizeof(sin.sin_addr));
> getnameinfo((struct sockaddr *)&sin, sin.sin_len,
> host, sizeof(host), NULL, 0, NI_NOFQDN);
> break;
> @@ -157,7 +157,7 @@ print_name(struct pf_addr *addr, sa_family_t af)
> memset(&sin6, 0, sizeof(sin6));
> sin6.sin6_len = sizeof(sin6);
> sin6.sin6_family = AF_INET6;
> - sin6.sin6_addr = addr->v6;
> + memcpy(&sin6.sin6_addr, addr->v6, sizeof(sin6.sin6_addr));
> getnameinfo((struct sockaddr *)&sin6, sin6.sin6_len,
> host, sizeof(host), NULL, 0, NI_NOFQDN);
> break;
> @@ -175,7 +175,7 @@ print_host(struct pf_addr *addr, u_int16_t port, s
> struct pf_addr_wrap aw;
>
> memset(&aw, 0, sizeof(aw));
> - aw.v.a.addr = *addr;
> + memcpy(&aw.v.a.addr, addr, sizeof(aw.v.a.addr));
> if (af == AF_INET)
> aw.v.a.mask.addr32[0] = 0xffffffff;
> else {
>
> _______________________________________________
> freebsd-arm at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org"
>
More information about the freebsd-arm
mailing list