diff --git a/src/wscutil.c b/src/wscutil.c index 8c0dcdd7..f881e057 100644 --- a/src/wscutil.c +++ b/src/wscutil.c @@ -275,6 +275,15 @@ static bool extract_device_password_id(struct wsc_attr_iter *iter, void *data) return true; } +static bool extract_mac_address(struct wsc_attr_iter *iter, void *data) +{ + if (wsc_attr_iter_get_length(iter) != 6) + return false; + + memcpy(data, wsc_attr_iter_get_data(iter), 6); + return true; +} + static bool extract_manufacturer(struct wsc_attr_iter *iter, void *data) { return extract_ascii_string(iter, data, 64); @@ -423,6 +432,8 @@ static attr_handler handler_for_type(enum wsc_attr type) return extract_device_name; case WSC_ATTR_DEVICE_PASSWORD_ID: return extract_device_password_id; + case WSC_ATTR_MAC_ADDRESS: + return extract_mac_address; case WSC_ATTR_MANUFACTURER: return extract_manufacturer; case WSC_ATTR_MESSAGE_TYPE: