diff options
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/socket.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 6d4991e8f67..3c00b40f815 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -1223,11 +1223,8 @@ static u32 filter_rcv(struct sock *sk, struct sk_buff *buf) /* Reject message if it is wrong sort of message for socket */ - /* - * WOULD IT BE BETTER TO JUST DISCARD THESE MESSAGES INSTEAD? - * "NO PORT" ISN'T REALLY THE RIGHT ERROR CODE, AND THERE MAY - * BE SECURITY IMPLICATIONS INHERENT IN REJECTING INVALID TRAFFIC - */ + if (msg_type(msg) > TIPC_DIRECT_MSG) + return TIPC_ERR_NO_PORT; if (sock->state == SS_READY) { if (msg_connected(msg)) |