Re: lost change 272451 - CAP_EVENT for tcpdump (Re: svn commit: r276788 - in head: contrib/tcpdump contrib/tcpdump/lbl contrib/tcpdump/missing usr.sbin/tcpdump/tcpdump

2015-02-08 Thread Dag-Erling Smørgrav
Bryan Drewery  writes:
> The problem is that pf is implemented differently on FreeBSD and OpenBSD
> for pid/uid tracking. The code would be overly complex to support both
> and I gave up on that. Even getting it to work on FreeBSD required the
> _KERNEL define hack for UID_MAX, which our pf uses to note 'no uid value'.

First-class stupidity on POSIX's part which defines FOO_MAX for almost
every single integer type but not for uid_t or gid_t.  FreeBSD has them,
but Linux doesn't, so I usually end up doing

#ifndef UID_MAX
#define UID_MAX ((uid_t)-1)
#endif

in cross-platform code.

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Re: lost change 272451 - CAP_EVENT for tcpdump (Re: svn commit: r276788 - in head: contrib/tcpdump contrib/tcpdump/lbl contrib/tcpdump/missing usr.sbin/tcpdump/tcpdump

2015-02-05 Thread Bryan Drewery
On 2/5/2015 2:11 PM, Pedro Giffuni wrote:
> 
> On 02/05/15 13:30, Luigi Rizzo wrote:
>> Hi,
>> the update to tcpdump 4.6.2 also lost svn272451 and 272653 (addition of
>> CAP_EVENT to the capabilities given to tcpdump).
>>
>> Given this and the other bug fixed in 277638, I am not sure if there
>> are other local changes that have been lost in the merge.
>> Also I wonder whether there is something we should have done
>> differently when applying local changes to code in contrib/ to make
>> sure that the merge from vendor does not overwrite them ?
>>
>> cheers
>> luigi
> 
> FWIW, I think what happened here is that upstream merged
> our capsicum changes only partially and the corresponding clash
> made it difficult to understand what came from where.
> 
> If our local changes are too big and upstream is very active,
> this complexity is unavoidable but it is always good to try to
> upstream all that we can, and the tcpdump maintainers have
> been rather open to taking changes.
> 
> Cheers,
> 
> Pedro.

I've been sitting on a change for a while that I don't think upstream
can take.

https://people.freebsd.org/~bdrewery/patches/tcpdump-pflog-uid.diff is a
version of the patch. I'm not sure if it was my final one. I would need
to test again before committing.

The problem is that pf is implemented differently on FreeBSD and OpenBSD
for pid/uid tracking. The code would be overly complex to support both
and I gave up on that. Even getting it to work on FreeBSD required the
_KERNEL define hack for UID_MAX, which our pf uses to note 'no uid value'.

I was considering committing this, but was not sure on the proper way to
note our changes. #if __FreeBSD__ was my guess.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: lost change 272451 - CAP_EVENT for tcpdump (Re: svn commit: r276788 - in head: contrib/tcpdump contrib/tcpdump/lbl contrib/tcpdump/missing usr.sbin/tcpdump/tcpdump

2015-02-05 Thread Pedro Giffuni


On 02/05/15 13:30, Luigi Rizzo wrote:

Hi,
the update to tcpdump 4.6.2 also lost svn272451 and 272653 (addition of
CAP_EVENT to the capabilities given to tcpdump).

Given this and the other bug fixed in 277638, I am not sure if there
are other local changes that have been lost in the merge.
Also I wonder whether there is something we should have done
differently when applying local changes to code in contrib/ to make
sure that the merge from vendor does not overwrite them ?

cheers
luigi


FWIW, I think what happened here is that upstream merged
our capsicum changes only partially and the corresponding clash
made it difficult to understand what came from where.

If our local changes are too big and upstream is very active,
this complexity is unavoidable but it is always good to try to
upstream all that we can, and the tcpdump maintainers have
been rather open to taking changes.

Cheers,

Pedro.

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


lost change 272451 - CAP_EVENT for tcpdump (Re: svn commit: r276788 - in head: contrib/tcpdump contrib/tcpdump/lbl contrib/tcpdump/missing usr.sbin/tcpdump/tcpdump

2015-02-05 Thread Luigi Rizzo
Hi,
the update to tcpdump 4.6.2 also lost svn272451 and 272653 (addition of
CAP_EVENT to the capabilities given to tcpdump).

Given this and the other bug fixed in 277638, I am not sure if there
are other local changes that have been lost in the merge.
Also I wonder whether there is something we should have done
differently when applying local changes to code in contrib/ to make
sure that the merge from vendor does not overwrite them ?

cheers
luigi

On Wed, Jan 7, 2015 at 8:55 PM, Xin LI  wrote:
> Author: delphij
> Date: Wed Jan  7 19:55:18 2015
> New Revision: 276788
> URL: https://svnweb.freebsd.org/changeset/base/276788
>
> Log:
>   MFV r276761: tcpdump 4.6.2.
>
>   MFC after:1 month
>
> Added:
>   head/contrib/tcpdump/README.md
>  - copied unchanged from r276761, vendor/tcpdump/dist/README.md
>   head/contrib/tcpdump/getopt_long.h
>  - copied unchanged from r276761, vendor/tcpdump/dist/getopt_long.h
>   head/contrib/tcpdump/missing/getopt_long.c
>  - copied unchanged from r276761, 
> vendor/tcpdump/dist/missing/getopt_long.c
>   head/contrib/tcpdump/openflow.h
>  - copied unchanged from r276761, vendor/tcpdump/dist/openflow.h
>   head/contrib/tcpdump/print-ahcp.c
>  - copied unchanged from r276761, vendor/tcpdump/dist/print-ahcp.c
>   head/contrib/tcpdump/print-aoe.c
>  - copied unchanged from r276761, vendor/tcpdump/dist/print-aoe.c
>   head/contrib/tcpdump/print-calm-fast.c
>  - copied unchanged from r276761, vendor/tcpdump/dist/print-calm-fast.c
>   head/contrib/tcpdump/print-geonet.c
>  - copied unchanged from r276761, vendor/tcpdump/dist/print-geonet.c
>   head/contrib/tcpdump/print-loopback.c
>  - copied unchanged from r276761, vendor/tcpdump/dist/print-loopback.c
>   head/contrib/tcpdump/print-m3ua.c
>  - copied unchanged from r276761, vendor/tcpdump/dist/print-m3ua.c
>   head/contrib/tcpdump/print-mptcp.c
>  - copied unchanged from r276761, vendor/tcpdump/dist/print-mptcp.c
>   head/contrib/tcpdump/print-nflog.c
>  - copied unchanged from r276761, vendor/tcpdump/dist/print-nflog.c
>   head/contrib/tcpdump/print-openflow-1.0.c
>  - copied unchanged from r276761, vendor/tcpdump/dist/print-openflow-1.0.c
>   head/contrib/tcpdump/print-openflow.c
>  - copied unchanged from r276761, vendor/tcpdump/dist/print-openflow.c
>   head/contrib/tcpdump/print-pktap.c
>  - copied unchanged from r276761, vendor/tcpdump/dist/print-pktap.c
>   head/contrib/tcpdump/rpl.h
>  - copied unchanged from r276761, vendor/tcpdump/dist/rpl.h
> Deleted:
>   head/contrib/tcpdump/README
>   head/contrib/tcpdump/acconfig.h
>   head/contrib/tcpdump/aodv.h
>   head/contrib/tcpdump/arcnet.h
>   head/contrib/tcpdump/bgp.h
>   head/contrib/tcpdump/dccp.h
>   head/contrib/tcpdump/decnet.h
>   head/contrib/tcpdump/decode_prefix.h
>   head/contrib/tcpdump/enc.h
>   head/contrib/tcpdump/esp.h
>   head/contrib/tcpdump/fddi.h
>   head/contrib/tcpdump/forces.h
>   head/contrib/tcpdump/icmp6.h
>   head/contrib/tcpdump/ieee802_11.h
>   head/contrib/tcpdump/ieee802_11_radio.h
>   head/contrib/tcpdump/igrp.h
>   head/contrib/tcpdump/ipfc.h
>   head/contrib/tcpdump/ipnet.h
>   head/contrib/tcpdump/ipsec_doi.h
>   head/contrib/tcpdump/ipx.h
>   head/contrib/tcpdump/isakmp.h
>   head/contrib/tcpdump/l2tp.h
>   head/contrib/tcpdump/lane.h
>   head/contrib/tcpdump/missing/sockstorage.h
>   head/contrib/tcpdump/netbios.h
>   head/contrib/tcpdump/ntp.h
>   head/contrib/tcpdump/oakley.h
>   head/contrib/tcpdump/ospf6.h
>   head/contrib/tcpdump/pmap_prot.h
>   head/contrib/tcpdump/ppi.h
>   head/contrib/tcpdump/print-netbios.c
>   head/contrib/tcpdump/route6d.h
>   head/contrib/tcpdump/rx.h
>   head/contrib/tcpdump/sctpConstants.h
>   head/contrib/tcpdump/sctpHeader.h
>   head/contrib/tcpdump/slip.h
>   head/contrib/tcpdump/sll.h
>   head/contrib/tcpdump/telnet.h
>   head/contrib/tcpdump/tftp.h
>   head/contrib/tcpdump/timed.h
>   head/contrib/tcpdump/token.h
> Modified:
>   head/contrib/tcpdump/CHANGES
>   head/contrib/tcpdump/CREDITS
>   head/contrib/tcpdump/INSTALL.txt
>   head/contrib/tcpdump/Makefile-devel-adds
>   head/contrib/tcpdump/Makefile.in
>   head/contrib/tcpdump/VERSION
>   head/contrib/tcpdump/addrtoname.c
>   head/contrib/tcpdump/addrtoname.h
>   head/contrib/tcpdump/af.c
>   head/contrib/tcpdump/af.h
>   head/contrib/tcpdump/ah.h
>   head/contrib/tcpdump/appletalk.h
>   head/contrib/tcpdump/atm.h
>   head/contrib/tcpdump/atmuni31.h
>   head/contrib/tcpdump/bootp.h
>   head/contrib/tcpdump/bpf_dump.c
>   head/contrib/tcpdump/chdlc.h
>   head/contrib/tcpdump/checksum.c
>   head/contrib/tcpdump/config.guess
>   head/contrib/tcpdump/config.h.in
>   head/contrib/tcpdump/config.sub
>   head/contrib/tcpdump/configure
>   head/contrib/tcpdump/configure.in
>   head/contrib/tcpdump/cpack.c
>   head/contrib/tcpdump/cpack.h
>   head/contrib/tcpdump/ether.h
>   head/contrib/tcpdump/ethertype.h
>   head/contrib/tcpdump/extract.h
>   head/contrib/tcpdump/gmpls.c
>   head/contrib/tc