aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/feat.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/feat.c')
-rw-r--r--net/dccp/feat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/dccp/feat.c b/net/dccp/feat.c
index 192d494..f79fb5e 100644
--- a/net/dccp/feat.c
+++ b/net/dccp/feat.c
@@ -342,6 +342,10 @@ static int __feat_register_sp(struct list_head *fn, u8 feat, u8 is_local,
!dccp_feat_sp_list_ok(feat, sp_val, sp_len))
return -EINVAL;
+ /* Avoid negotiating alien CCIDs by only advertising supported ones */
+ if (feat == DCCPF_CCID && !ccid_support_check(sp_val, sp_len))
+ return -EOPNOTSUPP;
+
if (dccp_feat_clone_sp_val(&fval, sp_val, sp_len))
return -ENOMEM;