Comments (3)
Had to revert my changes (because, reasons,) but still needed apply the use of eth_hw_addr_set
- the diff as a result:
diff --git a/snull/snull.c b/snull/snull.c
index 2efc2b5..adc5899 100644
--- a/snull/snull.c
+++ b/snull/snull.c
@@ -213,9 +213,10 @@ int snull_open(struct net_device *dev)
* x is 0 or 1. The first byte is '\0' to avoid being a multicast
* address (the first byte of multicast addrs is odd).
*/
- memcpy(dev->dev_addr, "\0SNUL0", ETH_ALEN);
- if (dev == snull_devs[1])
- dev->dev_addr[ETH_ALEN-1]++; /* \0SNUL1 */
+ if (dev == snull_devs[0])
+ eth_hw_addr_set(dev, "\0SNUL0");
+ else
+ eth_hw_addr_set(dev, "\0SNUL1");
if (use_napi) {
struct snull_priv *priv = netdev_priv(dev);
napi_enable(&priv->napi);
from ldd3.
Thanks @pauljherring do you want to create a pull request for this?
Should probably check for kernel 5.15 and later based on torvalds/linux@48eab83
See
Line 93 in bf49bb4
KERNEL_VERSION
from ldd3.
.. I'm not at all sure that I'm the right person to be doing a pull request on this project, or for this in particular:
- it's not clear it's sufficient - even after compiling, the driver doesn't "work" as expected for me (pings go to the first interface, but don't make it out the other end, for example); this merely "gets it to compile"
- whether anything else in the repo needs looking at; I'm only concentrating on the network driver because I need to deal with an in-house network driver and this is part of my self-education on such matters.
from ldd3.
Related Issues (20)
- sbull is still obsolete, not able to compile on 5.x linux kernel versions HOT 4
- Build on 5.7 Kernel HOT 1
- kernel panic generation when i run "insmod snull.ko" at 4.19.94-ti-r50 HOT 3
- build error with Linux v5.9-rc8 HOT 9
- Error compiling misc-progs in ARM aarch64. HOT 2
- Return value of cdev_add() in ldd3/scullp/main.c HOT 2
- ldd3 has been verified on alpine 3.13. HOT 2
- not compiling on raspberrypi 4 , help plz HOT 2
- when test snull driver, ping remote1 sometimes return 100% packet loss HOT 4
- Compile fail Debian 11, kernel 5.10 HOT 4
- Not compiling on Ubuntu 21.10 kernel version 5.14.16 HOT 2
- sbull.c: implicit declaration of function blk_alloc_queue against kernel version 5.14.9 HOT 1
- A lock is missing to relaese in snull_get_tx_buffer HOT 2
- *** No rule to make target 'Device'. Stop. HOT 4
- <linux/genhd.h> has been removed but referenced in sbull.c
- Errors while compiling => In jit.c HOT 2
- Build failure with kernel versions < 5.17 due to usage of pde_data() HOT 1
- Writing `u32` with `iowrite8` in `silly.c` HOT 1
- does this project support to compile on WSL ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ldd3.