npd makes use of gmt2local, however that library has been removed from
tcpdump. Add utc_offset() as a substitute.
Details
- Reviewers
emaste jhb melifaro - Commits
- rG1cdec2832d05: ndp: Prepare for pending tcpdump update
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 51962 Build 48853: arc lint + arc unit
Event Timeline
Should we be concerned that the long tm->tm_gmtoff will be implicitly cast as int32_t when it's returned?
This seems OK as a minimal change.
We may want to follow tcpdump's ts_print() more closely though, in a subsequent change.
Nit: s/npd/ndp/ in commit log
usr.sbin/ndp/ndp.c | ||
---|---|---|
187 | Given this is only used with a value of 0, I would maybe go ahead and assume that and remove the argument from here entirely, that is, have it start as: static int32_t utc_offset(void) { struct tm *tm; time t; t = time(NULL); tm = localtime(&t); ... | |
197 |
The "also" here seems somewhat out of place to me for some reason but I'm not quite sure why. Maybe "Also, for compatibility with NetBSD the..." or "The kqueue1 function is also provided, for compatibility with NetBSD. It accepts..."