Skip to content

Commit 61787a1

Browse files
authored
Merge pull request #141 from alesax/probe_attr_len
tlshd: probe the attributes with correct attribute length
2 parents e65f3b6 + d686e6f commit 61787a1

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

src/tlshd/netlink.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,18 @@ static bool tlshd_probe_attr(struct nl_sock *nls, int cmd, int attr_type)
253253
return false;
254254
}
255255

256-
nla_put_string(msg, attr_type, "__probe__");
256+
switch (attr_type) {
257+
case HANDSHAKE_A_DONE_TAG:
258+
nla_put_string(msg, attr_type, "__probe__");
259+
break;
260+
case HANDSHAKE_A_DONE_REMOTE_AUTH:
261+
nla_put_s32(msg, attr_type, 0);
262+
break;
263+
default:
264+
tlshd_log_error("Attribute %d not supported", attr_type);
265+
nlmsg_free(msg);
266+
return false;
267+
}
257268

258269
err = nl_send_auto(nls, msg);
259270
nlmsg_free(msg);

0 commit comments

Comments
 (0)