Discussion:
[OpenAFS-devel] RX/AFS support in tcpdump
Denis Ovsienko
2018-07-18 16:45:43 UTC
Permalink
Hello list.

I have an inquiry regarding OpenAFS protocol(s) encoding.

tcpdump used to have a decoder for a protocol that works on UDP ports range [7000, 7009]. In the IANA registry this exact range is assigned to a family of AFS3 services. The tcpdump decoder is implemented in the file print-rx.c, which internally mentions AFS quite a number of times. So I take it the code in it has something to do with the work done on this mailing list.

The problem is, since GCC became smart enough to detect possible fall-through, tcpdump started to have 4 fall-through compiler warnings in that file, please see https://github.com/the-tcpdump-group/tcpdump/issues/618 for the exact details.

It would be nice to get rid of the warnings, but I failed to interpret the code flow without a specification of AFS. print-rx.c was originally contributed in 1999 and the last protocol-specific update to it was in 2008. It does receive generic maintenance, but in the AFS sense it has been effectively frozen.

Is there anybody on this list (or anybody you could forward this to), who could interpret the code flow in print-rx.c and address the fall-through warnings (break from the case or mark up as a genuine fall-through)? It would also be very helpful if an AFS encoding expert looked through the rest of the code in print-rx.c (less than 3000 lines) and told where the decoder is on the scale between "obsolete" and "100% up to date". Ideally the expert would also contribute a quality patch to make the code up to date, but that sounds too good to be true, I know.

Thank you.
--
Denis Ovsienko
Ken Hornstein
2018-07-18 17:55:38 UTC
Permalink
Post by Denis Ovsienko
The problem is, since GCC became smart enough to detect
possible fall-through, tcpdump started to have 4
fall-through compiler warnings in that file, please see
https://github.com/the-tcpdump-group/tcpdump/issues/618 for the exact
details.
I was the original author of that file (although it's obviously been
changed since my original contribution), so I can take a look at it if
you want. The AFS protocol hasn't really changed much since then except
with the addition of some new RPCs.

--Ken
Denis Ovsienko
2018-07-18 18:33:58 UTC
Permalink
Post by Ken Hornstein
Post by Denis Ovsienko
The problem is, since GCC became smart enough to detect
possible fall-through, tcpdump started to have 4
fall-through compiler warnings in that file, please see
https://github.com/the-tcpdump-group/tcpdump/issues/618 for the exact
details.
I was the original author of that file (although it's obviously been
changed since my original contribution), so I can take a look at it if
you want. The AFS protocol hasn't really changed much since then except
with the addition of some new RPCs.
Thank you for the offer Ken. Please take a look if you can, feel free to send tcpdump-specific comments to the tcpdump-workers mailing list if you want.

The master branch of tcpdump lives at https://github.com/the-tcpdump-group/tcpdump

"touch .devel" before "./configure" will enable all warnings for the tcpdump build and yield current line numbers (the bug report is 1 year old). I am not sure which version of GCC started to report those issues, version 7.3.0 definitely does it.
--
Denis Ovsienko
Denis Ovsienko
2018-07-28 20:33:26 UTC
Permalink
---- On Wed, 18 Jul 2018 17:45:43 +0100 Denis Ovsienko <***@ovsienko.info> wrote ----
[...]
Post by Denis Ovsienko
Is there anybody on this list (or anybody you could forward this to), who could interpret the code flow in print-rx.c and address the fall-through warnings (break from the case or mark up as a genuine fall-through)? It would also be very helpful if an AFS encoding expert looked through the rest of the code in print-rx.c (less than 3000 lines) and told where the decoder is on the scale between "obsolete" and "100% up to date". Ideally the expert would also contribute a quality patch to make the code up to date, but that sounds too good to be true, I know.
Hello list.

I have just committed the fall-through fixes to tcpdump as suggested by Benjamin Kaduk. Does anybody have a reasonably short packet dump of RX/AFS protocol exchange that touches as many code paths in print-rx.c as possible? It could be one of the tcpdump test cases.
--
Denis Ovsienko
Loading...