diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-09-04 09:30:19 +0400 |
---|---|---|
committer | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-09-04 09:45:31 +0400 |
commit | 09856c108956c99088ead9267ccbd1dab77f7043 (patch) | |
tree | 39e29187c87429530f83d3aa672ec5b6214c8136 /net/dccp/feat.c | |
parent | 5d3dac267a7fd0811ec777e76a81f97f5cdcb395 (diff) | |
download | linux-09856c108956c99088ead9267ccbd1dab77f7043.tar.xz |
dccp: Auto-load (when supported) CCID plugins for negotiation
This adds auto-loading of CCIDs (when module loading is enabled)
for the purpose of feature negotiation.
The problem with loading the CCIDs at the end of feature negotiation is
that this would happen in software interrupt context. Besides, if the host
advertises CCIDs during negotiation, it should have them ready to use, in
case an agreeing peer wants to use it for the connection.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Diffstat (limited to 'net/dccp/feat.c')
-rw-r--r-- | net/dccp/feat.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/dccp/feat.c b/net/dccp/feat.c index a687740e4420..9a4938092783 100644 --- a/net/dccp/feat.c +++ b/net/dccp/feat.c @@ -1158,6 +1158,11 @@ int dccp_feat_init(struct sock *sk) ccid_get_builtin_ccids(&rx.val, &rx.len)) return -ENOBUFS; + /* Pre-load all CCID modules that are going to be advertised */ + rc = -EUNATCH; + if (ccid_request_modules(tx.val, tx.len)) + goto free_ccid_lists; + if (!dccp_feat_prefer(sysctl_dccp_feat_tx_ccid, tx.val, tx.len) || !dccp_feat_prefer(sysctl_dccp_feat_rx_ccid, rx.val, rx.len)) goto free_ccid_lists; |