Skip to content

Commit 9f542f6

Browse files
akodanevdavem330
authored andcommitted
ipv6: udp: convert 'connected' to bool type in udpv6_sendmsg()
This should make it consistent with ip6_sk_dst_lookup_flow() that is accepting the new 'connected' parameter of type bool. Signed-off-by: Alexey Kodanev <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9681815 commit 9f542f6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

net/ipv6/udp.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,10 +1116,10 @@ int udpv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
11161116
struct dst_entry *dst;
11171117
struct ipcm6_cookie ipc6;
11181118
int addr_len = msg->msg_namelen;
1119+
bool connected = false;
11191120
int ulen = len;
11201121
int corkreq = up->corkflag || msg->msg_flags&MSG_MORE;
11211122
int err;
1122-
int connected = 0;
11231123
int is_udplite = IS_UDPLITE(sk);
11241124
int (*getfrag)(void *, char *, int, int, int, struct sk_buff *);
11251125
struct sockcm_cookie sockc;
@@ -1241,7 +1241,7 @@ int udpv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
12411241
fl6.fl6_dport = inet->inet_dport;
12421242
daddr = &sk->sk_v6_daddr;
12431243
fl6.flowlabel = np->flow_label;
1244-
connected = 1;
1244+
connected = true;
12451245
}
12461246

12471247
if (!fl6.flowi6_oif)
@@ -1271,7 +1271,7 @@ int udpv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
12711271
}
12721272
if (!(opt->opt_nflen|opt->opt_flen))
12731273
opt = NULL;
1274-
connected = 0;
1274+
connected = false;
12751275
}
12761276
if (!opt) {
12771277
opt = txopt_get(np);
@@ -1293,11 +1293,11 @@ int udpv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
12931293

12941294
final_p = fl6_update_dst(&fl6, opt, &final);
12951295
if (final_p)
1296-
connected = 0;
1296+
connected = false;
12971297

12981298
if (!fl6.flowi6_oif && ipv6_addr_is_multicast(&fl6.daddr)) {
12991299
fl6.flowi6_oif = np->mcast_oif;
1300-
connected = 0;
1300+
connected = false;
13011301
} else if (!fl6.flowi6_oif)
13021302
fl6.flowi6_oif = np->ucast_oif;
13031303

0 commit comments

Comments
 (0)