Skip to content

Commit

Permalink
ipv4: Exposing __ip_sock_set_tos() in ip.h
Browse files Browse the repository at this point in the history
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 <psonparo@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Poorva Sonparote authored and David S. Miller committed Nov 20, 2021
1 parent 979594c commit 4f47d5d
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/net/ip.h
Original file line number Diff line number Diff line change
@@ -783,5 +783,6 @@ int ip_sock_set_mtu_discover(struct sock *sk, int val);
void ip_sock_set_pktinfo(struct sock *sk);
void ip_sock_set_recverr(struct sock *sk);
void ip_sock_set_tos(struct sock *sk, int val);
void __ip_sock_set_tos(struct sock *sk, int val);

#endif /* _IP_H */
2 changes: 1 addition & 1 deletion net/ipv4/ip_sockglue.c
Original file line number Diff line number Diff line change
@@ -576,7 +576,7 @@ int ip_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len)
return err;
}

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

0 comments on commit 4f47d5d

Please sign in to comment.