ggsn: Support IPv4v6 PDP contexts in helper icmpv6 functions
Change-Id: I564d51e02ea4b3cb5fedb79dfc1903c04619bd61
This commit is contained in:
parent
1f2d740c1a
commit
5760421255
|
@ -750,9 +750,22 @@ module GGSN_Tests {
|
|||
return f_IPv6_enc(ip6);
|
||||
}
|
||||
|
||||
/* Get link-id from PDP Context EUA */
|
||||
function f_ctx_get_ipv6_interface_id(in PdpContext ctx) return OCT16 {
|
||||
var OCT16 interface_id;
|
||||
if (ischosen(ctx.eua.endUserAddress.endUserAddressIPv4andIPv6)) {
|
||||
interface_id := ctx.eua.endUserAddress.endUserAddressIPv4andIPv6.ipv6_address;
|
||||
} else if (ischosen(ctx.eua.endUserAddress.endUserAddressIPv6)) {
|
||||
interface_id := ctx.eua.endUserAddress.endUserAddressIPv6.ipv6_address;
|
||||
} else {
|
||||
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Unexpected request to submit icmpv6 rs in IPv4 PDP context");
|
||||
}
|
||||
return interface_id;
|
||||
}
|
||||
|
||||
/* create ICMPv6 router solicitation deriving link-id from PDP Context EUA */
|
||||
function f_icmpv6_rs_for_pdp(in PdpContext ctx) return octetstring {
|
||||
var OCT16 interface_id := ctx.eua.endUserAddress.endUserAddressIPv6.ipv6_address;
|
||||
var OCT16 interface_id := f_ctx_get_ipv6_interface_id(ctx);
|
||||
return f_gen_icmpv6_router_solicitation(interface_id);
|
||||
}
|
||||
|
||||
|
@ -766,7 +779,7 @@ module GGSN_Tests {
|
|||
|
||||
/* generate and encode ICMPv6 neighbor solicitation for PDP Context */
|
||||
function f_gen_icmpv6_neigh_solicit_for_pdp(in PdpContext ctx) return octetstring {
|
||||
var OCT16 interface_id := ctx.eua.endUserAddress.endUserAddressIPv6.ipv6_address;
|
||||
var OCT16 interface_id := f_ctx_get_ipv6_interface_id(ctx);
|
||||
var OCT16 link_local := f_ipv6_link_local(interface_id);
|
||||
var OCT16 daddr := f_ipv6_sol_node_mcast(link_local);
|
||||
|
||||
|
|
Loading…
Reference in New Issue