瀏覽代碼

inet: constify inet_csk_route_child_sock() socket argument

The socket points to the (shared) listener.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet 10 年之前
父節點
當前提交
a2432c4fa5
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 2 1
      include/net/inet_connection_sock.h
  2. 1 1
      net/ipv4/inet_connection_sock.c

+ 2 - 1
include/net/inet_connection_sock.h

@@ -268,7 +268,8 @@ int inet_csk_get_port(struct sock *sk, unsigned short snum);
 
 
 struct dst_entry *inet_csk_route_req(const struct sock *sk, struct flowi4 *fl4,
 struct dst_entry *inet_csk_route_req(const struct sock *sk, struct flowi4 *fl4,
 				     const struct request_sock *req);
 				     const struct request_sock *req);
-struct dst_entry *inet_csk_route_child_sock(struct sock *sk, struct sock *newsk,
+struct dst_entry *inet_csk_route_child_sock(const struct sock *sk,
+					    struct sock *newsk,
 					    const struct request_sock *req);
 					    const struct request_sock *req);
 
 
 static inline void inet_csk_reqsk_queue_add(struct sock *sk,
 static inline void inet_csk_reqsk_queue_add(struct sock *sk,

+ 1 - 1
net/ipv4/inet_connection_sock.c

@@ -439,7 +439,7 @@ no_route:
 }
 }
 EXPORT_SYMBOL_GPL(inet_csk_route_req);
 EXPORT_SYMBOL_GPL(inet_csk_route_req);
 
 
-struct dst_entry *inet_csk_route_child_sock(struct sock *sk,
+struct dst_entry *inet_csk_route_child_sock(const struct sock *sk,
 					    struct sock *newsk,
 					    struct sock *newsk,
 					    const struct request_sock *req)
 					    const struct request_sock *req)
 {
 {