File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 3838#define ARPHRD_APPLETLK 8 /* APPLEtalk */
3939#define ARPHRD_DLCI 15 /* Frame Relay DLCI */
4040#define ARPHRD_ATM 19 /* ATM */
41+ #define ARPHRD_ATM_LANE 20 /* ATM LAN Emulation */
4142#define ARPHRD_METRICOM 23 /* Metricom STRIP (new IANA id) */
4243#define ARPHRD_IEEE1394 24 /* IEEE 1394 IPv4 - RFC 2734 */
4344#define ARPHRD_EUI64 27 /* EUI-64 */
Original file line number Diff line number Diff line change @@ -743,6 +743,7 @@ static int lecd_attach(struct atm_vcc *vcc, int arg)
743743 return - ENOMEM ;
744744 dev_lec [i ]-> netdev_ops = & lec_netdev_ops ;
745745 dev_lec [i ]-> max_mtu = 18190 ;
746+ dev_lec [i ]-> type = ARPHRD_ATM_LANE ;
746747 snprintf (dev_lec [i ]-> name , IFNAMSIZ , "lec%d" , i );
747748 if (register_netdev (dev_lec [i ])) {
748749 free_netdev (dev_lec [i ]);
Original file line number Diff line number Diff line change @@ -275,6 +275,9 @@ static struct net_device *find_lec_by_itfnum(int itf)
275275 sprintf (name , "lec%d" , itf );
276276 dev = dev_get_by_name (& init_net , name );
277277
278+ if (!dev || dev -> type != ARPHRD_ATM_LANE )
279+ return NULL ;
280+
278281 return dev ;
279282}
280283
@@ -1006,7 +1009,7 @@ static int mpoa_event_listener(struct notifier_block *mpoa_notifier,
10061009 if (!net_eq (dev_net (dev ), & init_net ))
10071010 return NOTIFY_DONE ;
10081011
1009- if (strncmp ( dev -> name , "lec" , 3 ) )
1012+ if (dev -> type != ARPHRD_ATM_LANE )
10101013 return NOTIFY_DONE ; /* we are only interested in lec:s */
10111014
10121015 switch (event ) {
You can’t perform that action at this time.
0 commit comments