Skip to content

Commit e5895bc

Browse files
edumazetdavem330
authored andcommitted
inet: constify inet_csk_route_req() socket argument
This is used by TCP listener core, and listener socket shall not be modified by inet_csk_route_req(). Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6f9c961 commit e5895bc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/net/inet_connection_sock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ int inet_csk_bind_conflict(const struct sock *sk,
266266
const struct inet_bind_bucket *tb, bool relax);
267267
int inet_csk_get_port(struct sock *sk, unsigned short snum);
268268

269-
struct dst_entry *inet_csk_route_req(struct sock *sk, struct flowi4 *fl4,
269+
struct dst_entry *inet_csk_route_req(const struct sock *sk, struct flowi4 *fl4,
270270
const struct request_sock *req);
271271
struct dst_entry *inet_csk_route_child_sock(struct sock *sk, struct sock *newsk,
272272
const struct request_sock *req);

net/ipv4/inet_connection_sock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ void inet_csk_reset_keepalive_timer(struct sock *sk, unsigned long len)
408408
}
409409
EXPORT_SYMBOL(inet_csk_reset_keepalive_timer);
410410

411-
struct dst_entry *inet_csk_route_req(struct sock *sk,
411+
struct dst_entry *inet_csk_route_req(const struct sock *sk,
412412
struct flowi4 *fl4,
413413
const struct request_sock *req)
414414
{

0 commit comments

Comments
 (0)