Prechádzať zdrojové kódy

sctp: Push struct net down into all of the state machine functions

There are a handle of state machine functions primarily those dealing
with processing INIT packets where there is neither a valid endpoint nor
a valid assoication from which to derive a struct net.  Therefore add
struct net * to the parameter list of sctp_state_fn_t and update all of
the state machine functions.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric W. Biederman 13 rokov pred
rodič
commit
24cb81a6a9
3 zmenil súbory, kde vykonal 150 pridanie a 123 odobranie
  1. 2 1
      include/net/sctp/sm.h
  2. 1 1
      net/sctp/sm_sideeffect.c
  3. 147 121
      net/sctp/sm_statefuns.c

+ 2 - 1
include/net/sctp/sm.h

@@ -77,7 +77,8 @@ typedef struct {
 	int action;
 } sctp_sm_command_t;
 
-typedef sctp_disposition_t (sctp_state_fn_t) (const struct sctp_endpoint *,
+typedef sctp_disposition_t (sctp_state_fn_t) (struct net *,
+					      const struct sctp_endpoint *,
 					      const struct sctp_association *,
 					      const sctp_subtype_t type,
 					      void *arg,

+ 1 - 1
net/sctp/sm_sideeffect.c

@@ -1123,7 +1123,7 @@ int sctp_do_sm(struct net *net, sctp_event_t event_type, sctp_subtype_t subtype,
 	sctp_init_cmd_seq(&commands);
 
 	DEBUG_PRE;
-	status = (*state_fn->fn)(ep, asoc, subtype, event_arg, &commands);
+	status = (*state_fn->fn)(net, ep, asoc, subtype, event_arg, &commands);
 	DEBUG_POST;
 
 	error = sctp_side_effects(event_type, subtype, state,

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 147 - 121
net/sctp/sm_statefuns.c


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov