Skip to content

Commit 4f47d5d

Browse files
Poorva Sonparotedavem330
authored andcommitted
ipv4: Exposing __ip_sock_set_tos() in ip.h
Making the static function __ip_sock_set_tos() from net/ipv4/ip_sockglue.c accessible by declaring it in include/net/ip.h The reason for doing this is to use this function to set IP_TOS value in mptcp_setsockopt() without the lock. Signed-off-by: Poorva Sonparote <[email protected]> Signed-off-by: Mat Martineau <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 979594c commit 4f47d5d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

include/net/ip.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,5 +783,6 @@ int ip_sock_set_mtu_discover(struct sock *sk, int val);
783783
void ip_sock_set_pktinfo(struct sock *sk);
784784
void ip_sock_set_recverr(struct sock *sk);
785785
void ip_sock_set_tos(struct sock *sk, int val);
786+
void __ip_sock_set_tos(struct sock *sk, int val);
786787

787788
#endif /* _IP_H */

net/ipv4/ip_sockglue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ int ip_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len)
576576
return err;
577577
}
578578

579-
static void __ip_sock_set_tos(struct sock *sk, int val)
579+
void __ip_sock_set_tos(struct sock *sk, int val)
580580
{
581581
if (sk->sk_type == SOCK_STREAM) {
582582
val &= ~INET_ECN_MASK;

0 commit comments

Comments
 (0)