Testers needed for libpcap 1.2.0 on OpenBSD reddit / BSD ---------------------------------------------------------------------- [deleted] · 2012-05-23 01:22 Added to my next autobuild. It'll make it into a test lab in a week or two, and I'll offer some feedback then. ---------------------------------------------------------------------- masta · 2012-05-23 04:32 wait, so libpcap is part of the base world of openbsd, and cannot be easily updated? Awesome. You're doing it wrong! No really, why is this not a port? and BTW I think it's neat that parts of the base world depend on libpcap.... sounds like a fun OS, but then this problem exits.... ---------------------------------------------------------------------- zmyrgel · 2012-05-23 04:47 Its not a port because other programs in base system depend on it. It can't be just updated willy-nilly, it needs to be tested and this seems to address it so whats the problem. ---------------------------------------------------------------------- hegbork · 2012-05-23 05:35 Because ports update themselves automagically? Also, tcpdump. ---------------------------------------------------------------------- phessler · 2012-05-23 06:41 Why do you think it being a port would make it easier to update? We still do all of the testing and verification that it doesn't break shit *even for ports*. ---------------------------------------------------------------------- masta · 2012-05-23 13:49 > Why do you think it being a port would make it easier to update? Actually, yes I do think that especially In terms of dependencies. They could all go together in one chop of the axe. To me it's just so simple, have libpcap follow the upstream. Forking pcap for the base system has it's benefit and it's problems, so here is an example of a problem, having tcpdump in base is a great benefit too. :-) ---------------------------------------------------------------------- masta · 2012-05-23 13:52 Perhaps obsd should reconsider forking active upstream code if the forks are just going to rot! I think having those bits that depend on pcap in base is great, but at the same time maybe those should be ports instead... minimize base, which is not out of line with the secure by default mentality. A minimal base is less code to audit, less surface area for threats, and the kind of tools that use pcap are certainly helpful for local users to stage illicit activities. ---------------------------------------------------------------------- phessler · 2012-05-23 14:04 I don't follow. This still needs to be tested and verified that it a) works as expected, and b) doesn't break things. As a port or in base doesn't matter much for this. And we will *not* have dependencies on ports, for building anything in base. That is right out. ---------------------------------------------------------------------- masta · 2012-05-23 14:11 I'd say a port could break another port, that is acceptable and especially if the ports have different maintainers. Breaking base is a whole different set of standards and policies, and should never happen. I completely agree on the q/a aspects. The needful should be done, and it's not a big deal to follow down all the ports that have pcap marked as a dep. ---------------------------------------------------------------------- phessler · 2012-05-23 14:47 I see what you're thinking, but the policy in OpenBSD is updates are *not* allowed to break other ports. You either need to fix it, or figure out some acceptable solution. ---------------------------------------------------------------------- [deleted] · 2012-05-23 15:58 The main reason? tcpdump. ---------------------------------------------------------------------- masta · 2012-05-23 17:47 yes obviously. Is tcpdump really necessary for a base OS, no. Should be a port, not OS bloat that requires messy api version hacks. ---------------------------------------------------------------------- [deleted] · 2012-05-23 20:43 That's your opinion, and it's fine. But obsd has decided it's worth keeping in base, so we have to keep the surrounding environment up. ---------------------------------------------------------------------- masta · 2012-05-23 20:54 But (obviously) that has not been happening. this is why forks are (in my opinion) bad, and especially in the base. I has nothing to do with forking the library, but more with maintaining a bastard version. Supporting multiple version of an API (in base) that the upstream has since moved on from is silly. We are tacitly approving the rot of base in an OS that prides in auditing code, especially external code. since when has obsd become so relaxed on it's own standards? Makeing external code base, and just let it rot is not cool. Then supporting multiple version of the API to accommodating the inability of some or all parts of the ports or base to catch up is weird. Just follow the upstream, drop support in base... ---------------------------------------------------------------------- avatar4d · 2012-05-23 21:49 No, OpenBSD thoroughly audits the security of everything in base, not ports. Given its nature, it makes more sense in base. ---------------------------------------------------------------------- masta · 2012-05-23 22:19 > OpenBSD thoroughly audits the security of everything in base yes, that is assumed. except that a fork does not make sense.... Now an audit is required each time pcap is merged. Beyond that, it's silly... does tcpdump really merrit base? This should be a port to start with. But, as I've wrote before, it's really neat that somebody does consider tcpdump worth being in base... too bad the result is libpcap being forked and having to support multiple API versions. Forking is a right, and a privileged... We have th right to do that... and the privileged of maintaining the churn it causes. Apparently nobody has been maintain libpcap, or we would not be here now. ---------------------------------------------------------------------- lteo · 2012-05-24 04:10 Thank you! ---------------------------------------------------------------------- [deleted] · 2012-05-24 13:33 Actually, it does need to be in base. If you had ever used OpenBSD in production, you'd know that tcpdump is heavily patched (additional filters, etc) and mandatory for troubleshooting the firewall stack (which mind you, is much easier to troubleshoot than mangled Netfilter shit.) ---------------------------------------------------------------------- [deleted] · 2012-05-24 13:37 OpenBSD's libpcap is not the same as the upstream of the same version. It's patched AND audited like the rest of the base OS. For most of the devs, there are no compelling reasons to upgrade and potentially import new bugs and/ or vulnerabilities. ---------------------------------------------------------------------- [deleted] · 2012-05-24 13:45 A fork makes perfect sense -- the only reason to upgrade libpcap is for applications that require newer versions, and then there is the option to compile from source if you really need it. The version of libpcap included in base does exactly what it is intended to do and as such there are no compelling reasons to follow the current versions of it. ---------------------------------------------------------------------- calrogman · 2012-05-24 16:01 Isn't part of the OpenBSD pkgsrc policy that `cd`ing to the root of the pkgsrc tree and running `make install` should install every single package without error? ---------------------------------------------------------------------- [deleted] · 2012-05-25 03:32 [deleted] ---------------------------------------------------------------------- [deleted] · 2012-05-25 03:45 Snort doesn't come in base -- and base is what most of the devs are primarily concerned with. ---------------------------------------------------------------------- [deleted] · 2012-05-25 04:22 [deleted] ---------------------------------------------------------------------- phessler · 2012-05-25 07:03 We don't have pkgsrc, that is NetBSD. In principle, yes. However, there are some packages that conflict with each other. Usually when they both install the same named files, but they cannot be moved for some reason. Of course the conflict is correctly marked, so it refuses to install because of the conflict. ---------------------------------------------------------------------- lteo · 2012-05-25 14:28 The libpcap update [has been committed](http://marc.info/?l=openbsd- cvs&m=133791129820432&w=2)! Thank you to all who tested! Continuous testing before release is of course very welcome :) ---------------------------------------------------------------------- [deleted] · 2012-05-31 04:10 Very nice, this went into today's autobuild so I'll do some prerelease testing on it over the next few days. ---------------------------------------------------------------------- sys_spoon · 2012-06-05 19:44 Thanks for doing this. I'll continue my testing throughout the week. For anyone needing a later version of tcpdump for whatever reason, after this patch there is a small libpcap function you might want to consider importing as well to make tcpdump 4.2.1 compile easily - all it is is a wrapper for free(); called pcap_free_datalinks(); - You can also just change the function in tcpdump.c:458 from pcap_free_datalinks(dlts); to free(dlts); and it will compile and run fine: ~ > uname -a; ./tcpdump-4.2.1/tcpdump -h OpenBSD nat.local 5.1 GENERIC.MP#207 amd64 tcpdump version 4.2.1 OpenBSD libpcap There is a warning concerning a typedef, but I haven't been able to determine the adverse effects from this - if any. As for using the most current tcpdump/libpcap to sniff under OpenBSD I think you may want something else - there are other far more capable operating systems with zero-copy capabilities that will sniff a higher volume of traffic and write it to disk faster than OpenBSD will - if you're trying to use the -C and -w flags on your openbsd edge there are better options out there.