[NETFILTER]: nf_conntrack_h323: fix ASN.1 types

1. Add support for decoding IPv6 address. I know it was manually added in
the header file, but not in the template file. That wouldn't work.
2. Add missing support for decoding T.120 address in OLCA.
3. Remove unnecessary decoding of Information signal.

Signed-off-by: Jing Min Zhao <zhaojingmin@vivecode.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Jing Min Zhao and committed by David S. Miller d0529186 25b86e05

+16 -38
+3 -20
include/linux/netfilter/nf_conntrack_h323_types.h
··· 1 - /* Generated by Jing Min Zhao's ASN.1 parser, Apr 20 2006 2 * 3 * Copyright (c) 2006 Jing Min Zhao <zhaojingmin@users.sourceforge.net> 4 * ··· 12 13 typedef struct TransportAddress_ip6Address { /* SEQUENCE */ 14 int options; /* No use */ 15 - unsigned ip6; 16 } TransportAddress_ip6Address; 17 18 typedef struct TransportAddress { /* CHOICE */ ··· 364 Alerting_UUIE_fastStart fastStart; 365 } Alerting_UUIE; 366 367 - typedef struct Information_UUIE_fastStart { /* SEQUENCE OF */ 368 - int count; 369 - OpenLogicalChannel item[30]; 370 - } Information_UUIE_fastStart; 371 - 372 - typedef struct Information_UUIE { /* SEQUENCE */ 373 - enum { 374 - eInformation_UUIE_callIdentifier = (1 << 31), 375 - eInformation_UUIE_tokens = (1 << 30), 376 - eInformation_UUIE_cryptoTokens = (1 << 29), 377 - eInformation_UUIE_fastStart = (1 << 28), 378 - eInformation_UUIE_fastConnectRefused = (1 << 27), 379 - eInformation_UUIE_circuitInfo = (1 << 26), 380 - } options; 381 - Information_UUIE_fastStart fastStart; 382 - } Information_UUIE; 383 - 384 typedef struct FacilityReason { /* CHOICE */ 385 enum { 386 eFacilityReason_routeCallToGatekeeper, ··· 454 CallProceeding_UUIE callProceeding; 455 Connect_UUIE connect; 456 Alerting_UUIE alerting; 457 - Information_UUIE information; 458 Facility_UUIE facility; 459 Progress_UUIE progress; 460 }; ··· 543 } options; 544 OpenLogicalChannelAck_reverseLogicalChannelParameters 545 reverseLogicalChannelParameters; 546 OpenLogicalChannelAck_forwardMultiplexAckParameters 547 forwardMultiplexAckParameters; 548 } OpenLogicalChannelAck;
··· 1 + /* Generated by Jing Min Zhao's ASN.1 parser, May 16 2007 2 * 3 * Copyright (c) 2006 Jing Min Zhao <zhaojingmin@users.sourceforge.net> 4 * ··· 12 13 typedef struct TransportAddress_ip6Address { /* SEQUENCE */ 14 int options; /* No use */ 15 + unsigned ip; 16 } TransportAddress_ip6Address; 17 18 typedef struct TransportAddress { /* CHOICE */ ··· 364 Alerting_UUIE_fastStart fastStart; 365 } Alerting_UUIE; 366 367 typedef struct FacilityReason { /* CHOICE */ 368 enum { 369 eFacilityReason_routeCallToGatekeeper, ··· 471 CallProceeding_UUIE callProceeding; 472 Connect_UUIE connect; 473 Alerting_UUIE alerting; 474 Facility_UUIE facility; 475 Progress_UUIE progress; 476 }; ··· 561 } options; 562 OpenLogicalChannelAck_reverseLogicalChannelParameters 563 reverseLogicalChannelParameters; 564 + NetworkAccessParameters separateStack; 565 OpenLogicalChannelAck_forwardMultiplexAckParameters 566 forwardMultiplexAckParameters; 567 } OpenLogicalChannelAck;
+13 -18
net/netfilter/nf_conntrack_h323_types.c
··· 1 - /* Generated by Jing Min Zhao's ASN.1 parser, Apr 20 2006 2 * 3 * Copyright (c) 2006 Jing Min Zhao <zhaojingmin@users.sourceforge.net> 4 * ··· 37 38 static field_t _TransportAddress_ip6Address[] = { /* SEQUENCE */ 39 {FNAME("ip") OCTSTR, FIXD, 16, 0, DECODE, 40 - offsetof(TransportAddress_ip6Address, ip6), NULL}, 41 {FNAME("port") INT, WORD, 0, 0, SKIP, 0, NULL}, 42 }; 43 ··· 67 {FNAME("ipxAddress") SEQ, 0, 3, 3, SKIP, 0, 68 _TransportAddress_ipxAddress}, 69 {FNAME("ip6Address") SEQ, 0, 2, 2, DECODE | EXT, 70 - offsetof(TransportAddress, ip6Address), _TransportAddress_ip6Address}, 71 {FNAME("netBios") OCTSTR, FIXD, 16, 0, SKIP, 0, NULL}, 72 {FNAME("nsap") OCTSTR, 5, 1, 0, SKIP, 0, NULL}, 73 {FNAME("nonStandardAddress") SEQ, 0, 2, 2, SKIP, 0, ··· 639 }; 640 641 static field_t _UnicastAddress_iP6Address[] = { /* SEQUENCE */ 642 - {FNAME("network") OCTSTR, FIXD, 16, 0, SKIP, 0, NULL}, 643 {FNAME("tsapIdentifier") INT, WORD, 0, 0, SKIP, 0, NULL}, 644 }; 645 ··· 667 offsetof(UnicastAddress, iPAddress), _UnicastAddress_iPAddress}, 668 {FNAME("iPXAddress") SEQ, 0, 3, 3, SKIP | EXT, 0, 669 _UnicastAddress_iPXAddress}, 670 - {FNAME("iP6Address") SEQ, 0, 2, 2, SKIP | EXT, 0, 671 - _UnicastAddress_iP6Address}, 672 {FNAME("netBios") OCTSTR, FIXD, 16, 0, SKIP, 0, NULL}, 673 {FNAME("iPSourceRouteAddress") SEQ, 0, 4, 4, SKIP | EXT, 0, 674 _UnicastAddress_iPSourceRouteAddress}, ··· 986 {FNAME("featureSet") SEQ, 3, 4, 4, SKIP | EXT | OPT, 0, NULL}, 987 }; 988 989 - static field_t _Information_UUIE_fastStart[] = { /* SEQUENCE OF */ 990 - {FNAME("item") SEQ, 1, 3, 5, DECODE | OPEN | EXT, 991 - sizeof(OpenLogicalChannel), _OpenLogicalChannel} 992 - , 993 - }; 994 - 995 static field_t _Information_UUIE[] = { /* SEQUENCE */ 996 {FNAME("protocolIdentifier") OID, BYTE, 0, 0, SKIP, 0, NULL}, 997 {FNAME("callIdentifier") SEQ, 0, 1, 1, SKIP | EXT, 0, NULL}, 998 {FNAME("tokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, 999 {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, 1000 - {FNAME("fastStart") SEQOF, SEMI, 0, 30, DECODE | OPT, 1001 - offsetof(Information_UUIE, fastStart), _Information_UUIE_fastStart}, 1002 {FNAME("fastConnectRefused") NUL, FIXD, 0, 0, SKIP | OPT, 0, NULL}, 1003 {FNAME("circuitInfo") SEQ, 3, 3, 3, SKIP | EXT | OPT, 0, NULL}, 1004 }; ··· 1338 offsetof(H323_UU_PDU_h323_message_body, connect), _Connect_UUIE}, 1339 {FNAME("alerting") SEQ, 1, 3, 17, DECODE | EXT, 1340 offsetof(H323_UU_PDU_h323_message_body, alerting), _Alerting_UUIE}, 1341 - {FNAME("information") SEQ, 0, 1, 7, DECODE | EXT, 1342 - offsetof(H323_UU_PDU_h323_message_body, information), 1343 - _Information_UUIE}, 1344 {FNAME("releaseComplete") SEQ, 1, 2, 11, SKIP | EXT, 0, 1345 _ReleaseComplete_UUIE}, 1346 {FNAME("facility") SEQ, 3, 5, 21, DECODE | EXT, ··· 1423 DECODE | EXT | OPT, offsetof(OpenLogicalChannelAck, 1424 reverseLogicalChannelParameters), 1425 _OpenLogicalChannelAck_reverseLogicalChannelParameters}, 1426 - {FNAME("separateStack") SEQ, 2, 4, 5, SKIP | EXT | OPT, 0, NULL}, 1427 {FNAME("forwardMultiplexAckParameters") CHOICE, 0, 1, 1, 1428 DECODE | EXT | OPT, offsetof(OpenLogicalChannelAck, 1429 forwardMultiplexAckParameters),
··· 1 + /* Generated by Jing Min Zhao's ASN.1 parser, May 16 2007 2 * 3 * Copyright (c) 2006 Jing Min Zhao <zhaojingmin@users.sourceforge.net> 4 * ··· 37 38 static field_t _TransportAddress_ip6Address[] = { /* SEQUENCE */ 39 {FNAME("ip") OCTSTR, FIXD, 16, 0, DECODE, 40 + offsetof(TransportAddress_ip6Address, ip), NULL}, 41 {FNAME("port") INT, WORD, 0, 0, SKIP, 0, NULL}, 42 }; 43 ··· 67 {FNAME("ipxAddress") SEQ, 0, 3, 3, SKIP, 0, 68 _TransportAddress_ipxAddress}, 69 {FNAME("ip6Address") SEQ, 0, 2, 2, DECODE | EXT, 70 + offsetof(TransportAddress, ip6Address), 71 + _TransportAddress_ip6Address}, 72 {FNAME("netBios") OCTSTR, FIXD, 16, 0, SKIP, 0, NULL}, 73 {FNAME("nsap") OCTSTR, 5, 1, 0, SKIP, 0, NULL}, 74 {FNAME("nonStandardAddress") SEQ, 0, 2, 2, SKIP, 0, ··· 638 }; 639 640 static field_t _UnicastAddress_iP6Address[] = { /* SEQUENCE */ 641 + {FNAME("network") OCTSTR, FIXD, 16, 0, DECODE, 642 + offsetof(UnicastAddress_iP6Address, network), NULL}, 643 {FNAME("tsapIdentifier") INT, WORD, 0, 0, SKIP, 0, NULL}, 644 }; 645 ··· 665 offsetof(UnicastAddress, iPAddress), _UnicastAddress_iPAddress}, 666 {FNAME("iPXAddress") SEQ, 0, 3, 3, SKIP | EXT, 0, 667 _UnicastAddress_iPXAddress}, 668 + {FNAME("iP6Address") SEQ, 0, 2, 2, DECODE | EXT, 669 + offsetof(UnicastAddress, iP6Address), _UnicastAddress_iP6Address}, 670 {FNAME("netBios") OCTSTR, FIXD, 16, 0, SKIP, 0, NULL}, 671 {FNAME("iPSourceRouteAddress") SEQ, 0, 4, 4, SKIP | EXT, 0, 672 _UnicastAddress_iPSourceRouteAddress}, ··· 984 {FNAME("featureSet") SEQ, 3, 4, 4, SKIP | EXT | OPT, 0, NULL}, 985 }; 986 987 static field_t _Information_UUIE[] = { /* SEQUENCE */ 988 {FNAME("protocolIdentifier") OID, BYTE, 0, 0, SKIP, 0, NULL}, 989 {FNAME("callIdentifier") SEQ, 0, 1, 1, SKIP | EXT, 0, NULL}, 990 {FNAME("tokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, 991 {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, 992 + {FNAME("fastStart") SEQOF, SEMI, 0, 30, SKIP | OPT, 0, NULL}, 993 {FNAME("fastConnectRefused") NUL, FIXD, 0, 0, SKIP | OPT, 0, NULL}, 994 {FNAME("circuitInfo") SEQ, 3, 3, 3, SKIP | EXT | OPT, 0, NULL}, 995 }; ··· 1343 offsetof(H323_UU_PDU_h323_message_body, connect), _Connect_UUIE}, 1344 {FNAME("alerting") SEQ, 1, 3, 17, DECODE | EXT, 1345 offsetof(H323_UU_PDU_h323_message_body, alerting), _Alerting_UUIE}, 1346 + {FNAME("information") SEQ, 0, 1, 7, SKIP | EXT, 0, _Information_UUIE}, 1347 {FNAME("releaseComplete") SEQ, 1, 2, 11, SKIP | EXT, 0, 1348 _ReleaseComplete_UUIE}, 1349 {FNAME("facility") SEQ, 3, 5, 21, DECODE | EXT, ··· 1430 DECODE | EXT | OPT, offsetof(OpenLogicalChannelAck, 1431 reverseLogicalChannelParameters), 1432 _OpenLogicalChannelAck_reverseLogicalChannelParameters}, 1433 + {FNAME("separateStack") SEQ, 2, 4, 5, DECODE | EXT | OPT, 1434 + offsetof(OpenLogicalChannelAck, separateStack), 1435 + _NetworkAccessParameters}, 1436 {FNAME("forwardMultiplexAckParameters") CHOICE, 0, 1, 1, 1437 DECODE | EXT | OPT, offsetof(OpenLogicalChannelAck, 1438 forwardMultiplexAckParameters),