Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion print-pgm.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ pgm_print(netdissect_options *ndo,
case PGM_NCF: {
const struct pgm_nak *nak;
char source_buf[INET6_ADDRSTRLEN], group_buf[INET6_ADDRSTRLEN];
unsigned afnum;

nak = (const struct pgm_nak *)(pgm + 1);
ND_TCHECK_SIZE(nak);
Expand Down Expand Up @@ -358,8 +359,9 @@ pgm_print(netdissect_options *ndo,
* Skip past the group, saving info along the way
* and stopping if we don't have enough.
*/
afnum = GET_BE_U_2(bp);
bp += (2 * sizeof(uint16_t));
switch (GET_BE_U_2(bp)) {
switch (afnum) {
case AFNUM_INET:
ND_TCHECK_LEN(bp, sizeof(nd_ipv4));
addrtostr(bp, group_buf, sizeof(group_buf));
Expand Down