AP: Add support for multicast-to-unicast conversion for DGAF Disable

When DGAF Disable is on, perform multicast-to-unicast for DHCP packets
and Router Advertisement packets. This is a requirement for Hotspot 2.0.

Signed-off-by: Kyeyoon Park <kyeyoonp@qca.qualcomm.com>
This commit is contained in:
Kyeyoon Park 2014-11-03 14:10:24 -08:00 committed by Jouni Malinen
parent bd00c4311c
commit 47261405d7
2 changed files with 11 additions and 0 deletions

View file

@ -128,6 +128,12 @@ static void handle_dhcp(void *ctx, const u8 *src_addr, const u8 *buf,
}
sta->ipaddr = b->your_ip;
}
if (hapd->conf->disable_dgaf && is_broadcast_ether_addr(buf)) {
for (sta = hapd->sta_list; sta; sta = sta->next)
x_snoop_mcast_to_ucast_convert_send(hapd, sta,
(u8 *) buf, len);
}
}

View file

@ -32,6 +32,7 @@ struct icmpv6_ndmsg {
u8 opt_lladdr[0];
};
#define ROUTER_ADVERTISEMENT 134
#define NEIGHBOR_SOLICITATION 135
#define NEIGHBOR_ADVERTISEMENT 136
#define SOURCE_LL_ADDR 1
@ -123,6 +124,10 @@ static void handle_ndisc(void *ctx, const u8 *src_addr, const u8 *buf,
return;
}
break;
case ROUTER_ADVERTISEMENT:
if (!hapd->conf->disable_dgaf)
return;
/* fall through */
case NEIGHBOR_ADVERTISEMENT:
for (sta = hapd->sta_list; sta; sta = sta->next) {
x_snoop_mcast_to_ucast_convert_send(hapd, sta,