Reference for Beitzah 4:2
אֵין נוֹטְלִין עֵצִים מִן הַסֻּכָּה, אֶלָּא מִן הַסָּמוּךְ לָהּ. מְבִיאִין עֵצִים מִן הַשָּׂדֶה מִן הַמְכֻנָּס, וּמִן הַקַּרְפֵּף אֲפִלּוּ מִן הַמְפֻזָּר. אֵיזֶהוּ קַרְפֵּף, כֹּל שֶׁסָּמוּךְ לָעִיר, דִּבְרֵי רַבִּי יְהוּדָה. רַבִּי יוֹסֵי אוֹמֵר, כֹּל שֶׁנִּכְנָסִין לוֹ בְפוֹתַחַת, וַאֲפִלּוּ בְתוֹךְ תְּחוּם שַׁבָּת:
It is not permitted to take wood from a succah. [Even when the succah is not used for a mitzvah, as on Pesach or on Shevuoth, it is forbidden to take wood from it on yom tov by reason of "tearing down a tent."] (One may not take wood from a succah, but) only from what is near it, [such as reeds standing near the walls and not interwoven with the walls, so they are not considered part of them, for which reason they may be taken on yom tov.] [Torn off] wood may be brought from the field [within the tchum] from what is gathered, and from the karpif (an enclosure), even from what is scattered. [Our Mishnah represents an individual opinion and is not the halachah. The halachah is that one may bring wood only from what is gathered in the karpif. And he may not bring from the field at all, even from what is gathered, his mind not being set on that wood in that it is not guarded. But his mind is set on gathered wood in a karpif, which is guarded and fenced on all sides.] Which karpif (is permitted)? One [very] close to the city. These are the words of R. Yehudah. [This, when he has a key which is guarded, R. Yehudah requiring both, near the city and a key. (He does not mention the key, taking it for granted that karpifoth have keys.)] R. Yossi says: Whatever is entered by a key, even if it is within the Sabbath bound. [If there is a key, it need not be near, but (it is permitted) even if it is so far as to be near the end of the Sabbath bound. And if it is near, a key is not necessary. "Near and no key" or "a key and not near" are permitted. The halachah is in accordance with R. Yossi.]