Drop TCP packets with URG data

Closes #436
This commit is contained in:
M66B 2016-06-24 21:25:01 +02:00
parent 20ea73264a
commit 567f3dfcb1
2 changed files with 4 additions and 3 deletions

View File

@ -270,9 +270,6 @@ void handle_ip(const struct arguments *args,
if (tcp->rst)
flags[flen++] = 'R';
if (tcp->urg)
report_error(args, 3, "TCP out of band data");
// TODO checksum
}
else if (protocol != IPPROTO_HOPOPTS && protocol != IPPROTO_IGMP && protocol != IPPROTO_ESP)

View File

@ -441,6 +441,10 @@ jboolean handle_tcp(const struct arguments *args,
datalen, ntohs(tcphdr->window), uid);
log_android(tcphdr->urg ? ANDROID_LOG_WARN : ANDROID_LOG_DEBUG, packet);
// Drop URG data
if (tcphdr->urg)
return 1;
// Check session
if (cur == NULL) {
if (tcphdr->syn) {