Deleted Added
full compact
print-radius.c (313537) print-radius.c (327234)
1/*
2 * Copyright (C) 2000 Alfredo Andres Omella. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 482 unchanged lines hidden (view full) ---

491 register u_int i;
492
493 ND_TCHECK2(data[0],length);
494
495 switch(attr_code)
496 {
497 case TUNNEL_PASS:
498 if (length < 3)
1/*
2 * Copyright (C) 2000 Alfredo Andres Omella. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 482 unchanged lines hidden (view full) ---

491 register u_int i;
492
493 ND_TCHECK2(data[0],length);
494
495 switch(attr_code)
496 {
497 case TUNNEL_PASS:
498 if (length < 3)
499 {
500 ND_PRINT((ndo, "%s", tstr));
501 return;
502 }
499 goto trunc;
503 if (*data && (*data <=0x1F) )
504 ND_PRINT((ndo, "Tag[%u] ", *data));
505 else
506 ND_PRINT((ndo, "Tag[Unused] "));
507 data++;
508 length--;
509 ND_PRINT((ndo, "Salt %u ", EXTRACT_16BITS(data)));
510 data+=2;
511 length-=2;
512 break;
513 case TUNNEL_CLIENT_END:
514 case TUNNEL_SERVER_END:
515 case TUNNEL_PRIV_GROUP:
516 case TUNNEL_ASSIGN_ID:
517 case TUNNEL_CLIENT_AUTH:
518 case TUNNEL_SERVER_AUTH:
519 if (*data <= 0x1F)
520 {
521 if (length < 1)
500 if (*data && (*data <=0x1F) )
501 ND_PRINT((ndo, "Tag[%u] ", *data));
502 else
503 ND_PRINT((ndo, "Tag[Unused] "));
504 data++;
505 length--;
506 ND_PRINT((ndo, "Salt %u ", EXTRACT_16BITS(data)));
507 data+=2;
508 length-=2;
509 break;
510 case TUNNEL_CLIENT_END:
511 case TUNNEL_SERVER_END:
512 case TUNNEL_PRIV_GROUP:
513 case TUNNEL_ASSIGN_ID:
514 case TUNNEL_CLIENT_AUTH:
515 case TUNNEL_SERVER_AUTH:
516 if (*data <= 0x1F)
517 {
518 if (length < 1)
522 {
523 ND_PRINT((ndo, "%s", tstr));
524 return;
525 }
519 goto trunc;
526 if (*data)
527 ND_PRINT((ndo, "Tag[%u] ", *data));
528 else
529 ND_PRINT((ndo, "Tag[Unused] "));
530 data++;
531 length--;
532 }
533 break;
534 case EGRESS_VLAN_NAME:
520 if (*data)
521 ND_PRINT((ndo, "Tag[%u] ", *data));
522 else
523 ND_PRINT((ndo, "Tag[Unused] "));
524 data++;
525 length--;
526 }
527 break;
528 case EGRESS_VLAN_NAME:
529 if (length < 1)
530 goto trunc;
535 ND_PRINT((ndo, "%s (0x%02x) ",
536 tok2str(rfc4675_tagged,"Unknown tag",*data),
537 *data));
538 data++;
539 length--;
540 break;
541 }
542
531 ND_PRINT((ndo, "%s (0x%02x) ",
532 tok2str(rfc4675_tagged,"Unknown tag",*data),
533 *data));
534 data++;
535 length--;
536 break;
537 }
538
543 for (i=0; *data && i < length ; i++, data++)
539 for (i=0; i < length && *data; i++, data++)
544 ND_PRINT((ndo, "%c", (*data < 32 || *data > 126) ? '.' : *data));
545
546 return;
547
548 trunc:
549 ND_PRINT((ndo, "%s", tstr));
550}
551

--- 446 unchanged lines hidden ---
540 ND_PRINT((ndo, "%c", (*data < 32 || *data > 126) ? '.' : *data));
541
542 return;
543
544 trunc:
545 ND_PRINT((ndo, "%s", tstr));
546}
547

--- 446 unchanged lines hidden ---