P2P: Add support for cross connection

If enabled, cross connection allows GO to forward IPv4 packets
using masquerading NAT from the P2P clients in the group to an
uplink WLAN connection. This is disabled by default and can be
enabled with "wpa_cli p2p_set cross_connect 1" on the P2P device
interface.
This commit is contained in:
Jouni Malinen 2010-07-10 10:19:34 -07:00 committed by Jouni Malinen
parent 6c6915f3db
commit 72044390f3
15 changed files with 289 additions and 5 deletions

View file

@ -650,6 +650,21 @@ int p2p_attr_text(struct wpabuf *data, char *buf, char *end)
}
int p2p_get_cross_connect_disallowed(const struct wpabuf *p2p_ie)
{
struct p2p_message msg;
os_memset(&msg, 0, sizeof(msg));
if (p2p_parse_p2p_ie(p2p_ie, &msg))
return 0;
if (!msg.manageability)
return 0;
return !(msg.capability[0] & P2P_MAN_CROSS_CONNECTIION_PERMITTED);
}
u8 p2p_get_group_capab(const struct wpabuf *p2p_ie)
{
struct p2p_message msg;