Changeset 317e903
- Timestamp:
- 02/28/17 16:08:39 (4 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, master, ndag_format, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance
- Children:
- d759ee1
- Parents:
- 6450950
- Location:
- lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/libtrace.h.in
rb148e3b r317e903 869 869 #define LIBTRACE_GRE_FLAG_VERMASK 0x0007 870 870 871 872 /* PPTP GRE (RFC2637) */ 873 #define LIBTRACE_GRE_FLAG_ACK 0x0080 874 #define LIBTRACE_GRE_PPTP_VERSION 0x0001 875 871 876 /** Libtrace local definition of VXLAN Header 872 877 * (draft-mahalingam-dutt-dcops-vxlan) -
lib/protocols_transport.c
ree6e802 r317e903 549 549 uint32_t *remaining) 550 550 { 551 uint8_t flags = ntohs(gre->flags); 551 552 uint32_t size = 4; /* GRE is 4 bytes long by default */ 552 553 if (remaining && *remaining < size) { … … 555 556 } 556 557 557 if ((ntohs(gre->flags) & LIBTRACE_GRE_FLAG_CHECKSUM) != 0) { 558 size += 4; /* An extra 4 bytes. */ 559 } 560 561 if ((ntohs(gre->flags) & LIBTRACE_GRE_FLAG_KEY) != 0) { 562 size += 4; /* An extra 4 bytes. */ 563 } 564 565 if ((ntohs(gre->flags) & LIBTRACE_GRE_FLAG_SEQ) != 0) { 566 size += 4; /* An extra 4 bytes. */ 558 if((flags & LIBTRACE_GRE_FLAG_VERMASK) == LIBTRACE_GRE_PPTP_VERSION) { 559 size += 4; 560 561 if ((flags & LIBTRACE_GRE_FLAG_SEQ) != 0) { 562 size += 4; 563 } 564 if ((flags & LIBTRACE_GRE_FLAG_ACK) != 0) { 565 size += 4; 566 } 567 } else { 568 569 if ((ntohs(gre->flags) & LIBTRACE_GRE_FLAG_CHECKSUM) != 0) { 570 size += 4; /* An extra 4 bytes. */ 571 } 572 573 if ((ntohs(gre->flags) & LIBTRACE_GRE_FLAG_KEY) != 0) { 574 size += 4; /* An extra 4 bytes. */ 575 } 576 577 if ((ntohs(gre->flags) & LIBTRACE_GRE_FLAG_SEQ) != 0) { 578 size += 4; /* An extra 4 bytes. */ 579 } 567 580 } 568 581
Note: See TracChangeset
for help on using the changeset viewer.